Skip to content

Instantly share code, notes, and snippets.

@Jared-Prime
Last active March 6, 2019 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jared-Prime/88668d169a971cfb6e6377a79e0f1b76 to your computer and use it in GitHub Desktop.
Save Jared-Prime/88668d169a971cfb6e6377a79e0f1b76 to your computer and use it in GitHub Desktop.
Dockerfile for running DonkeyCar training jobs on AWS Sagemaker
FROM nvidia/cuda:9.0-base-ubuntu16.04
LABEL maintainer="Jared Davis <jdavis@servercentral.com>"
# Pick up some TF dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cuda-command-line-tools-9-0 \
cuda-cublas-9-0 \
cuda-cufft-9-0 \
cuda-curand-9-0 \
cuda-cusolver-9-0 \
cuda-cusparse-9-0 \
curl \
libcudnn7=7.2.1.38-1+cuda9.0 \
libnccl2=2.2.13-1+cuda9.0 \
libfreetype6-dev \
libhdf5-serial-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
python3 \
python3-dev \
rsync \
software-properties-common \
unzip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install nvinfer-runtime-trt-repo-ubuntu1604-4.0.1-ga-cuda9.0 && \
apt-get update && \
apt-get install libnvinfer4=4.1.2-1+cuda9.0
RUN ln -s $(which python3) /usr/bin/python && \
curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
RUN pip --no-cache-dir install \
Pillow \
h5py \
ipykernel \
jupyter \
keras_applications \
keras_preprocessing \
matplotlib \
numpy \
pandas \
scipy \
sklearn \
tensorflow-gpu==1.12 \
"sagemaker-tensorflow>=1.12,<1.13"
ENV PYTHONUNBUFFERED=TRUE
ENV PYTHONDONTWRITEBYTECODE=TRUE
ENV PATH="/opt/program:${PATH}"
WORKDIR /opt/program
ARG donkeysha=36547b7e02d195214852b8ac647f6853071c8de6
ADD https://github.com/tawnkramer/donkey/archive/${donkeysha}.zip donkey.zip
RUN unzip donkey.zip && \
mv donkey-${donkeysha} donkey && \
cd donkey && \
pip install -e . && \
donkey createcar --path /opt/program/car
COPY train /opt/program/train
RUN chmod +x /opt/program/train
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment