forked from Paperspace/fastai-docker-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (47 loc) · 1.78 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM nvidia/cuda:9.2-base-ubuntu16.04
LABEL com.nvidia.volumes.needed="nvidia_driver"
RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
curl \
vim \
ca-certificates \
python-qt4 \
libjpeg-dev \
zip \
unzip \
libpng-dev &&\
rm -rf /var/lib/apt/lists/*
ENV PYTHON_VERSION=3.6
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install conda-build
WORKDIR /notebooks
RUN git clone https://github.com/fastai/fastai.git .
RUN ls && /opt/conda/bin/conda env create
ENV PATH /opt/conda/envs/fastai/bin:$PATH
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
ENV USER fastai
CMD source activate fastai
CMD source ~/.bashrc
# PyTorch 1.0 and FastAI 1.0
RUN /opt/conda/bin/conda install --name fastai -c conda-forge jupyterlab
RUN /opt/conda/bin/conda install --name fastai -c pytorch pytorch-nightly cuda92
RUN /opt/conda/bin/conda install --name fastai -c fastai torchvision-nightly
RUN /opt/conda/bin/conda install --name fastai -c fastai fastai
RUN /opt/conda/bin/conda install --name fastai -c fastai fastprogress
RUN /opt/conda/bin/conda clean -ya
RUN chmod -R a+w /notebooks
ENV PATH /opt/conda/bin:$PATH
WORKDIR /notebooks
# Clone course-v3 repo
RUN git clone https://github.com/fastai/course-v3.git
# Link
ENV PATH /opt/conda/envs/fastai/bin:$PATH
COPY config.yml /root/.fastai/config.yml
COPY run.sh /run.sh
CMD ["/run.sh"]