11FROM nvidia/cuda:9.2-base-ubuntu16.04
2-
2+ # See http://bugs.python.org/issue19846
3+ ENV LANG C.UTF-8
34LABEL com.nvidia.volumes.needed="nvidia_driver"
45
56RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
@@ -18,44 +19,31 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1819 libpng-dev &&\
1920 rm -rf /var/lib/apt/lists/*
2021
22+ ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
2123ENV PYTHON_VERSION=3.6
24+
2225RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
2326 chmod +x ~/miniconda.sh && \
2427 ~/miniconda.sh -b -p /opt/conda && \
2528 rm ~/miniconda.sh && \
2629 /opt/conda/bin/conda install conda-build
2730
28- WORKDIR /notebooks
29-
30- # clone fastai v1.0.42
31- RUN git clone --single-branch --branch 1.0.42 https://github.com/fastai/fastai.git .
32- RUN ls && /opt/conda/bin/conda env create
33-
34- ENV PATH /opt/conda/envs/fastai/bin:$PATH
35- ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
31+ ENV PATH=$PATH:/opt/conda/bin/
3632ENV USER fastai
33+ # Create Enviroment
34+ COPY enviroment.yaml /enviroment.yaml
35+ RUN conda env create -f enviroment.yaml
3736
37+ WORKDIR /notebooks
38+ # Activate Source
3839CMD source activate fastai
3940CMD source ~/.bashrc
4041
41- # PyTorch 1.0 and FastAI 1.0
42- RUN /opt/conda/bin/conda install --name fastai -c conda-forge jupyterlab
43- RUN /opt/conda/bin/conda install --name fastai -c pytorch pytorch-nightly cuda92
44- RUN /opt/conda/bin/conda install --name fastai -c fastai torchvision
45- RUN /opt/conda/bin/conda install --name fastai -c fastai fastai
46- RUN /opt/conda/bin/conda install --name fastai -c fastai fastprogress
47- RUN /opt/conda/bin/conda clean -ya
48-
4942RUN chmod -R a+w /notebooks
50-
51- ENV PATH /opt/conda/bin:$PATH
5243WORKDIR /notebooks
5344
54- # Clone course-v3 repo and checkout v3 master commit hash as of 1/24/2019
55- RUN git clone https://github.com/fastai/course-v3.git && cd course-v3 && git checkout 2d532e82517a8b528b351fa6b2da985da0affe8b & cd ..
56- RUN git checkout
57-
58- ENV PATH /opt/conda/envs/fastai/bin:$PATH
45+ # Clone course-v3
46+ RUN git clone https://github.com/fastai/course-v3.git
5947
6048COPY config.yml /root/.fastai/config.yml
6149COPY run.sh /run.sh
0 commit comments