Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 6bbea1b

Browse files
author
Louis DeLosSantos
authored
Merge pull request #20 from Paperspace/fix/fastai-v3
Fix/fastai v3
2 parents edb06ca + 053fa7f commit 6bbea1b

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

fastai-v3/Dockerfile

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM nvidia/cuda:9.2-base-ubuntu16.04
2-
2+
# See http://bugs.python.org/issue19846
3+
ENV LANG C.UTF-8
34
LABEL com.nvidia.volumes.needed="nvidia_driver"
45

56
RUN 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
2123
ENV PYTHON_VERSION=3.6
24+
2225
RUN 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/
3632
ENV 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
3839
CMD source activate fastai
3940
CMD 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-
4942
RUN chmod -R a+w /notebooks
50-
51-
ENV PATH /opt/conda/bin:$PATH
5243
WORKDIR /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

6048
COPY config.yml /root/.fastai/config.yml
6149
COPY run.sh /run.sh

fastai-v3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ Nvidia Drivers
2626

2727
You can also just run the following without having to build the entire container yourself. This will pull the container from Docker Hub.
2828

29-
`sudo docker run --runtime=nvidia -d -p 8888:8888 paperspace/fastai:1.0-CUDA9.2-base-3.0`
29+
`sudo docker run --runtime=nvidia -d -p 8888:8888 paperspace/fastai:1.0-CUDA9.2-base-3.0-v1.0.6`

fastai-v3/enviroment.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: fastai
2+
channels:
3+
- conda-forge
4+
- pytorch
5+
- fastai
6+
dependencies:
7+
- pytorch
8+
- torchvision
9+
- cuda92
10+
- fastprogress
11+
- fastai
12+
- jupyter
13+
- pip:
14+
- nvidia-ml-py3
15+
- dataclasses

fastai-v3/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
2-
2+
source activate fastai
33
ln -s /storage /notebooks/course-v3/nbs/dl1/data
44
jupyter notebook --ip=0.0.0.0 --no-browser --allow-root

0 commit comments

Comments
 (0)