├── README.md ├── fastai-fastbook ├── Dockerfile ├── README.md └── run.sh └── older-versions ├── fastai-fastbook-lab ├── Dockerfile ├── README.md ├── config.yml ├── environment.yaml └── run.sh ├── fastai-v2 ├── Dockerfile ├── Instructions.md ├── README.md └── run.sh ├── fastai-v3 ├── Dockerfile ├── Instructions.md ├── README.md ├── config.yml ├── environment.yaml └── run.sh ├── fastai-v4-lab-debugger ├── Dockerfile ├── Instructions.md ├── README.md ├── config.yml ├── debugger_install.sh ├── environment.yaml └── run.sh ├── fastai-v4-lab ├── Dockerfile ├── Instructions.md ├── README.md ├── config.yml ├── environment.yaml └── run.sh └── fastai-v4 ├── Dockerfile ├── Instructions.md ├── README.md ├── config.yml ├── environment.yaml └── run.sh /README.md: -------------------------------------------------------------------------------- 1 | # Paperspace + Fast.ai Docker Files 2 | This repos containers dockerfiles for use with Fast.ai online courses. Each folder corresponds with the verion of the Fast.ai course you are participating in. Course version specific readme files are provided within each subdirectory. 3 | -------------------------------------------------------------------------------- /fastai-fastbook/Dockerfile: -------------------------------------------------------------------------------- 1 | # Paperspace base image is located in Dockerhub registry: paperspace/gradient_base 2 | # Paperspace Fast.ai image is located Dockerhub registry: paperspace/fastai 3 | 4 | # ================================================================== 5 | # Initial Setup 6 | # ------------------------------------------------------------------ 7 | 8 | FROM paperspace/gradient-base:pt112-tf29-jax0317-py39-20221019 9 | 10 | 11 | # ================================================================== 12 | # Directories & Tools 13 | # ------------------------------------------------------------------ 14 | 15 | RUN mkdir /content && \ 16 | apt-get update -y && \ 17 | apt-get install -y graphviz 18 | 19 | 20 | # ================================================================== 21 | # Mambaforge 22 | # ------------------------------------------------------------------ 23 | 24 | # Based on https://github.com/conda-forge/miniforge 25 | 26 | RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh" && \ 27 | bash Mambaforge-$(uname)-$(uname -m).sh -b && \ 28 | ~/mambaforge/condabin/conda init && \ 29 | /root/mambaforge/bin/mamba install jupyter jupyterlab ipython -c conda-forge -y && \ 30 | rm Mambaforge-$(uname)-$(uname -m).sh 31 | ENV PATH=$PATH:/root/mambaforge/bin 32 | 33 | 34 | # ================================================================== 35 | # Fast.ai 36 | # ------------------------------------------------------------------ 37 | 38 | RUN python3 -m pip install --upgrade pip && \ 39 | python3 -m pip install --upgrade fastai >=2.6.0 && \ 40 | python3 -m pip install --upgrade fastbook && \ 41 | python3 -m pip install --upgrade jupyterlab-git 42 | 43 | 44 | # ================================================================== 45 | # Config & Startup 46 | # ------------------------------------------------------------------ 47 | 48 | ENV USER fastai 49 | WORKDIR /notebooks 50 | RUN chmod -R a+w /notebooks 51 | WORKDIR /notebooks 52 | 53 | COPY run.sh /run.sh 54 | RUN chmod +x /run.sh 55 | 56 | CMD ["/run.sh"] -------------------------------------------------------------------------------- /fastai-fastbook/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Paperspace/fastai-docker/6202cb5a1ac4698be6a2a995a3ccc43de6fbbe90/fastai-fastbook/README.md -------------------------------------------------------------------------------- /fastai-fastbook/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export SHELL=/bin/bash 4 | 5 | mkdir /notebooks/.gradient 6 | echo "integrations: 7 | fastai: 8 | type: dataset 9 | ref: paperspace/dsr4qbcrcg662pf:latest" > /notebooks/.gradient/settings.yaml 10 | 11 | if [ -f /storage/pre-run.sh ]; then 12 | . /storage/pre-run.sh 13 | fi 14 | 15 | jupyter "$@" 16 | -------------------------------------------------------------------------------- /older-versions/fastai-fastbook-lab/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:9.2-base-ubuntu16.04 2 | # See http://bugs.python.org/issue19846 3 | ENV LANG C.UTF-8 4 | LABEL com.nvidia.volumes.needed="nvidia_driver" 5 | 6 | RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends \ 9 | build-essential \ 10 | cmake \ 11 | git \ 12 | curl \ 13 | vim \ 14 | ca-certificates \ 15 | python-qt4 \ 16 | libjpeg-dev \ 17 | zip \ 18 | unzip \ 19 | openssh-client \ 20 | libpng-dev &&\ 21 | rm -rf /var/lib/apt/lists/* 22 | 23 | ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 24 | ENV PYTHON_VERSION=3.6 25 | 26 | RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ 27 | chmod +x ~/miniconda.sh && \ 28 | ~/miniconda.sh -b -p /opt/conda && \ 29 | rm ~/miniconda.sh && \ 30 | /opt/conda/bin/conda install conda-build 31 | 32 | ENV PATH=$PATH:/opt/conda/bin/ 33 | ENV USER fastai 34 | # Create Environment 35 | COPY environment.yaml /environment.yaml 36 | RUN conda env create -f environment.yaml 37 | 38 | WORKDIR /notebooks 39 | # Activate Source 40 | CMD source activate fastai 41 | CMD source ~/.bashrc 42 | 43 | RUN chmod -R a+w /notebooks 44 | WORKDIR /notebooks 45 | 46 | COPY config.yml /root/.fastai/config.yml 47 | COPY run.sh /run.sh 48 | 49 | CMD ["/run.sh"] 50 | -------------------------------------------------------------------------------- /older-versions/fastai-fastbook-lab/README.md: -------------------------------------------------------------------------------- 1 | # Paperspace + Fast.ai Docker files 2 | 3 | *Jupyterlab version* 4 | 5 | ## Overview 6 | 7 | This is a docker build file designed to work with [Paperspace]. The latest pre-built runtimes are pushed here: https://hub.docker.com/r/paperspace/fastai/ 8 | 9 | This container is intended to be used with to be used with the latest (v4) fast.ai fastbook repo. You can find this repo here: https://github.com/fastai/fastbook and you can learn more about the Fast.ai book here: http://book.fast.ai/ 10 | 11 | course-v4 is no longer a repo -- please use the clean directory of the fastbook repository (fastbook/clean) for that content 12 | 13 | ## Requirements: 14 | 15 | [Docker CE](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) 16 | 17 | [NVIDIA-docker](https://github.com/NVIDIA/nvidia-docker) 18 | 19 | Nvidia Drivers 20 | 21 | 22 | ## Build 23 | 24 | `sudo docker build -t paperspace/fastai .` 25 | 26 | ## Pre-built runtimes 27 | 28 | You can also just run the following without having to build the entire container yourself. This will pull the container from Docker Hub. 29 | 30 | `sudo docker run --gpus all -d -p 8888:8888 paperspace/fastai:2.0-CUDA9.2-fastbook-v0.0.8-lab /run.sh` 31 | -------------------------------------------------------------------------------- /older-versions/fastai-fastbook-lab/config.yml: -------------------------------------------------------------------------------- 1 | archive_path: /storage/archive/ 2 | data_path: /storage/data/ 3 | model_path: /storage/models/ 4 | storage_path: /storage/data/ 5 | version: 2 6 | 7 | -------------------------------------------------------------------------------- /older-versions/fastai-fastbook-lab/environment.yaml: -------------------------------------------------------------------------------- 1 | name: fastai 2 | channels: 3 | - conda-forge 4 | - pytorch 5 | - fastai 6 | - defaults 7 | dependencies: 8 | - pytorch>=1.3.0 9 | - torchvision>=0.5 10 | - matplotlib 11 | - cuda92 12 | - fastprogress>=0.1.22 13 | - fastai 14 | - jupyter 15 | - jupyterlab 16 | - pandas 17 | - requests 18 | - pyyaml 19 | - pillow 20 | - python>=3.6 21 | - pip 22 | - scikit-learn 23 | - scipy 24 | - spacy 25 | - graphviz 26 | - graphite2 27 | - pip: 28 | - nvidia-ml-py3 29 | - dataclasses 30 | - fastbook 31 | - fastprocess 32 | - fastai2 33 | - utils 34 | - graphviz 35 | - ipywidgets>=7.5.1 36 | - nbdev 37 | - azure-cognitiveservices-search-imagesearch 38 | -------------------------------------------------------------------------------- /older-versions/fastai-fastbook-lab/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source activate fastai 3 | export SHELL=/bin/bash 4 | mkdir -p /storage/data 5 | rm -rf /storage/lost+found 6 | ln -s /datasets/fastai/* /storage/data/ 7 | jupyter lab --ip=0.0.0.0 --no-browser --allow-root --LabApp.trust_xheaders=True --LabApp.disable_check_xsrf=False --LabApp.allow_remote_access=True --LabApp.allow_origin='*' 8 | -------------------------------------------------------------------------------- /older-versions/fastai-v2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 2 | 3 | LABEL com.nvidia.volumes.needed="nvidia_driver" 4 | 5 | RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list 6 | 7 | RUN apt-get update && apt-get install -y --no-install-recommends \ 8 | build-essential \ 9 | cmake \ 10 | git \ 11 | curl \ 12 | vim \ 13 | ca-certificates \ 14 | libnccl2=2.2.13-1+cuda9.0 \ 15 | libnccl-dev=2.2.13-1+cuda9.0 \ 16 | python-qt4 \ 17 | libjpeg-dev \ 18 | zip \ 19 | unzip \ 20 | bzip2 \ 21 | libpng-dev &&\ 22 | rm -rf /var/lib/apt/lists/* 23 | 24 | 25 | ENV PYTHON_VERSION=3.6 26 | RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ 27 | chmod +x ~/miniconda.sh && \ 28 | ~/miniconda.sh -b -p /opt/conda && \ 29 | rm ~/miniconda.sh && \ 30 | /opt/conda/bin/conda install conda-build -y 31 | 32 | 33 | WORKDIR /notebooks 34 | 35 | RUN git clone --single-branch --branch v0.7.1 https://github.com/fastai/fastai.git . 36 | RUN ls && /opt/conda/bin/conda env create 37 | RUN /opt/conda/bin/conda clean -ya 38 | 39 | ENV PATH /opt/conda/envs/fastai/bin:$PATH 40 | ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 41 | ENV USER fastai 42 | 43 | CMD source activate fastai 44 | CMD source ~/.bashrc 45 | 46 | RUN /opt/conda/bin/conda install --name fastai -c conda-forge jupyterlab 47 | 48 | WORKDIR /data 49 | 50 | RUN curl http://files.fast.ai/data/dogscats.zip --output dogscats.zip 51 | RUN unzip -d . dogscats.zip 52 | RUN rm dogscats.zip 53 | 54 | # occurs in entrypoint now 55 | # RUN ln -s /data/ /notebooks/courses/dl1/ 56 | 57 | RUN chmod -R a+w /notebooks 58 | 59 | ENV PATH /opt/conda/bin:$PATH 60 | WORKDIR /notebooks 61 | 62 | ENV PATH /opt/conda/envs/fastai/bin:$PATH 63 | 64 | COPY run.sh /run.sh 65 | 66 | CMD ["/run.sh"] 67 | -------------------------------------------------------------------------------- /older-versions/fastai-v2/Instructions.md: -------------------------------------------------------------------------------- 1 | # Fast.ai Deep Learning Course v3 on Gradient Notebooks 2 | 3 | This is a quick guide to starting Part 3 of the fast.ai course Practical Deep Learning for Coders using Gradient Notebooks. With Gradient, you get quick access to a Jupyter instance (Lab or Notebook) without having to set up a virtual machine. Paperspace is a GPU-accelerated cloud platform 4 | 5 | ### Summary of Charges 6 | There are no storage fees associated with using Gradient Notebooks. Users pay hourly usage fees for the time that their Notebooks are Running. The hourly rate is dependent on the Compute Type selected, see all available types [here](https://support.paperspace.com/hc/en-us/articles/360002484474-Gradient-Pricing). Notebooks must be stopped to end billing. Learn more about Gradient billing [here](https://support.paperspace.com/hc/en-us/articles/360001369914-How-Does-Gradient-Billing-Work-). 7 | 8 | ## Getting Set Up 9 | ### Step 1: Create a Paperspace Account 10 | If you haven't already, you'll need to sign up for Paperspace [here](https://www.paperspace.com/account/signup). Confirm your account using the link in the email you receive from Paperspace. [Sign in to Paperspace](https://www.paperspace.com/account/login). 11 | 12 | ![image](https://user-images.githubusercontent.com/585865/47126635-76af7c80-d257-11e8-8f33-b34be1ae8ef3.png) 13 | 14 | 15 | ### Step 2: Access Gradient & Create Notebook 16 | I. On the left-hand side of your Console under Gradient, select Notebooks. 17 | 18 | II. Select the *Fast.ai 1.0 / PyTorch 1.0 BETA* base container. 19 | 20 | **Note: for Pro users, learn more about this docker container at the [paperspace/fastai-docker repo](https://github.com/Paperspace/fastai-docker/tree/fastai/pytorch1.0)** 21 | 22 | ![image](https://user-images.githubusercontent.com/585865/47126835-719efd00-d258-11e8-8d8d-b402ef8baecc.png) 23 | 24 | 25 | III. Select your Compute Type. 26 | 27 | ![](https://support.paperspace.com/hc/article_attachments/360006919793/mceclip0.png) 28 | 29 | IV. Name your Notebook. 30 | 31 | V. Enter your payment details (if you're new to Paperspace). Even if you have a promo or referral code, all active Paperspace accounts must have a valid credit card on file. You'll be able to enter your promo code later. 32 | 33 | VI. Click Create Notebook 34 | 35 | When you click Create Notebook, that will start your Notebook and your billing for utilization will begin. To stop billing, you must stop your Notebook. Notebooks will automatically shut down after 12 hours. 36 | 37 | You'll be taken to your Notebook details page in your Console, where your Notebook will be created. It will go straight from Pending to Running, and will be ready to use. 38 | 39 | ### Step 3: Stopping your Notebook 40 | Under Action, just click stop. This will end the billing session. 41 | 42 | ![image](https://user-images.githubusercontent.com/585865/47126987-29340f00-d259-11e8-8432-10e47d3edbe0.png) 43 | 44 | ### Step 4: Restart your Notebook 45 | Click Start to pick up where you left off, and/or choose a different VM type on which you'd like to run your Notebook. 46 | 47 | --- 48 | 49 | The Compute Type of your Notebook can be changed when you start it. What this means for you is that you can prepare your work inexpensively and add a GPU when you're ready to run your model/algorithm. 50 | 51 | ![](https://support.paperspace.com/hc/article_attachments/360012358634/mceclip0.png) 52 | 53 | ## Managing Data 54 | Fast.ai data files (dogscats) can be found in the 'datasets' folder. Files in this directory are hosted by Paperspace and are read-only. See [Public Datasets](https://support.paperspace.com/hc/en-us/articles/360003092514-Public-Datasets) for more info. 55 | 56 | The `storage` folder is your [Persistent Storage](https://support.paperspace.com/hc/en-us/articles/360001468133-Persistent-Storage). Files placed here are available across runs of Paperspace Jobs, Notebooks, and Linux machines. Empty by default, this repository is meant to store training datasets. 57 | 58 | The rest of the files in the notebooks directories will be available as Artifacts when your notebook is stopped. 59 | 60 | ## Wrapping up 61 | Paperspace provides $10 of Gradient credit to start you off on your course. This code is to be used for fast.ai students only. In your console, click on Billing in the left-hand menu and enter the promo code at the bottom right. The promo code for this course is: *FASTAIGR45T*. 62 | 63 | Note: If you opt for a Gradient 1 Subscription, promotional credit does not apply. Learn more about Gradient Subscription levels here. 64 | 65 | Questions or issues related to course content, we recommend posting in the [fast.ai forum](http://forums.fast.ai/). 66 | 67 | For Paperspace-specific support, check out the rest of the Gradient Help Center or submit a support ticket with [this form](https://support.paperspace.com/hc/en-us/requests/new). 68 | -------------------------------------------------------------------------------- /older-versions/fastai-v2/README.md: -------------------------------------------------------------------------------- 1 | # Paperspace + Fast.ai Docker files 2 | 3 | 4 | ## Overview 5 | 6 | This is a docker build file designed to work with [Paperspace]. The latest pre-built runtimes are pushed here: https://hub.docker.com/r/paperspace/fastai/ 7 | 8 | This container pulls the latest fast.ai class. You can find this repo here: https://github.com/fastai/fastai and you can learn more about the Fast.ai course here: http://course.fast.ai/ 9 | 10 | ## Requirements: 11 | 12 | [Docker CE](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) 13 | 14 | [NVIDIA-docker](https://github.com/NVIDIA/nvidia-docker) 15 | 16 | Nvidia Drivers 17 | 18 | 19 | ## Build 20 | 21 | `sudo docker build -t paperspace/fastai .` 22 | 23 | ## Pre-built runtimes 24 | 25 | You can also just run the following without having to build the entire container yourself. This will pull the container from Docker Hub. 26 | 27 | `sudo docker run --gpus all -d -p 8888:8888 paperspace/fastai:0.7-CUDA9-base-2.0` 28 | -------------------------------------------------------------------------------- /older-versions/fastai-v2/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ln -s /data/ /notebooks/courses/dl1/ 4 | jupyter lab --ip=0.0.0.0 --no-browser --allow-root 5 | -------------------------------------------------------------------------------- /older-versions/fastai-v3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:9.2-base-ubuntu16.04 2 | # See http://bugs.python.org/issue19846 3 | ENV LANG C.UTF-8 4 | LABEL com.nvidia.volumes.needed="nvidia_driver" 5 | 6 | RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends \ 9 | build-essential \ 10 | cmake \ 11 | git \ 12 | curl \ 13 | vim \ 14 | ca-certificates \ 15 | python-qt4 \ 16 | libjpeg-dev \ 17 | zip \ 18 | unzip \ 19 | libpng-dev &&\ 20 | rm -rf /var/lib/apt/lists/* 21 | 22 | ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 23 | ENV PYTHON_VERSION=3.6 24 | 25 | RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ 26 | chmod +x ~/miniconda.sh && \ 27 | ~/miniconda.sh -b -p /opt/conda && \ 28 | rm ~/miniconda.sh && \ 29 | /opt/conda/bin/conda install conda-build 30 | 31 | ENV PATH=$PATH:/opt/conda/bin/ 32 | ENV USER fastai 33 | # Create Environment 34 | COPY environment.yaml /environment.yaml 35 | RUN conda env create -f environment.yaml 36 | 37 | WORKDIR /notebooks 38 | # Activate Source 39 | CMD source activate fastai 40 | CMD source ~/.bashrc 41 | 42 | RUN chmod -R a+w /notebooks 43 | WORKDIR /notebooks 44 | 45 | # Clone course-v3 46 | RUN git clone https://github.com/fastai/course-v3.git 47 | 48 | COPY config.yml /root/.fastai/config.yml 49 | COPY run.sh /run.sh 50 | 51 | CMD ["/run.sh"] 52 | -------------------------------------------------------------------------------- /older-versions/fastai-v3/Instructions.md: -------------------------------------------------------------------------------- 1 | # Fast.ai Deep Learning Course v3 on Gradient Notebooks 2 | 3 | This is a quick guide to starting Part 3 of the fast.ai course Practical Deep Learning for Coders using Gradient Notebooks. With Gradient, you get quick access to a Jupyter instance (Lab or Notebook) without having to set up a virtual machine. Paperspace is a GPU-accelerated cloud platform 4 | 5 | ### Summary of Charges 6 | There are no storage fees associated with using Gradient Notebooks. Users pay hourly usage fees for the time that their Notebooks are Running. The hourly rate is dependent on the Compute Type selected, see all available types [here](https://support.paperspace.com/hc/en-us/articles/360002484474-Gradient-Pricing). Notebooks must be stopped to end billing. Learn more about Gradient billing [here](https://support.paperspace.com/hc/en-us/articles/360001369914-How-Does-Gradient-Billing-Work-). 7 | 8 | ## Getting Set Up 9 | ### Step 1: Create a Paperspace Account 10 | If you haven't already, you'll need to sign up for Paperspace [here](https://www.paperspace.com/account/signup). Confirm your account using the link in the email you receive from Paperspace. [Sign in to Paperspace](https://www.paperspace.com/account/login). 11 | 12 | ![image](https://user-images.githubusercontent.com/585865/47126635-76af7c80-d257-11e8-8f33-b34be1ae8ef3.png) 13 | 14 | 15 | ### Step 2: Access Gradient & Create Notebook 16 | I. On the left-hand side of your Console under Gradient, select Notebooks. 17 | 18 | II. Select the *Fast.ai 1.0 / PyTorch 1.0 BETA* base container. 19 | 20 | **Note: for Pro users, learn more about this docker container at the [paperspace/fastai-docker repo](https://github.com/Paperspace/fastai-docker/tree/fastai/pytorch1.0)** 21 | 22 | ![image](https://user-images.githubusercontent.com/585865/47126835-719efd00-d258-11e8-8d8d-b402ef8baecc.png) 23 | 24 | 25 | III. Select your Compute Type. 26 | 27 | ![](https://support.paperspace.com/hc/article_attachments/360006919793/mceclip0.png) 28 | 29 | IV. Name your Notebook. 30 | 31 | V. Enter your payment details (if you're new to Paperspace). Even if you have a promo or referral code, all active Paperspace accounts must have a valid credit card on file. You'll be able to enter your promo code later. 32 | 33 | VI. Click Create Notebook 34 | 35 | When you click Create Notebook, that will start your Notebook and your billing for utilization will begin. To stop billing, you must stop your Notebook. Notebooks will automatically shut down after 12 hours. 36 | 37 | You'll be taken to your Notebook details page in your Console, where your Notebook will be created. It will go straight from Pending to Running, and will be ready to use. 38 | 39 | ### Step 3: Stopping your Notebook 40 | Under Action, just click stop. This will end the billing session. 41 | 42 | ![image](https://user-images.githubusercontent.com/585865/47126987-29340f00-d259-11e8-8432-10e47d3edbe0.png) 43 | 44 | ### Step 4: Restart your Notebook 45 | Click Start to pick up where you left off, and/or choose a different VM type on which you'd like to run your Notebook. 46 | 47 | --- 48 | 49 | The Compute Type of your Notebook can be changed when you start it. What this means for you is that you can prepare your work inexpensively and add a GPU when you're ready to run your model/algorithm. 50 | 51 | ![](https://support.paperspace.com/hc/article_attachments/360012358634/mceclip0.png) 52 | 53 | ## Managing Data 54 | Fast.ai data files (dogscats) can be found in the 'datasets' folder. Files in this directory are hosted by Paperspace and are read-only. See [Public Datasets](https://support.paperspace.com/hc/en-us/articles/360003092514-Public-Datasets) for more info. 55 | 56 | The `storage` folder is your [Persistent Storage](https://support.paperspace.com/hc/en-us/articles/360001468133-Persistent-Storage). Files placed here are available across runs of Paperspace Jobs, Notebooks, and Linux machines. Empty by default, this repository is meant to store training datasets. 57 | 58 | The rest of the files in the notebooks directories will be available as Artifacts when your notebook is stopped. 59 | 60 | ## Wrapping up 61 | Paperspace provides $10 of Gradient credit to start you off on your course. This code is to be used for fast.ai students only. In your console, click on Billing in the left-hand menu and enter the promo code at the bottom right. The promo code for this course is: *FASTAIGR45T*. 62 | 63 | Note: If you opt for a Gradient 1 Subscription, promotional credit does not apply. Learn more about Gradient Subscription levels here. 64 | 65 | Questions or issues related to course content, we recommend posting in the [fast.ai forum](http://forums.fast.ai/). 66 | 67 | For Paperspace-specific support, check out the rest of the Gradient Help Center or submit a support ticket with [this form](https://support.paperspace.com/hc/en-us/requests/new). 68 | -------------------------------------------------------------------------------- /older-versions/fastai-v3/README.md: -------------------------------------------------------------------------------- 1 | # Paperspace + Fast.ai Docker files 2 | 3 | 4 | ## Overview 5 | 6 | This is a docker build file designed to work with [Paperspace]. The latest pre-built runtimes are pushed here: https://hub.docker.com/r/paperspace/fastai/ 7 | 8 | This container pulls the latest fast.ai class. You can find this repo here: https://github.com/fastai/fastai and you can learn more about the Fast.ai course here: http://course.fast.ai/ 9 | 10 | ## Requirements: 11 | 12 | [Docker CE](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) 13 | 14 | [NVIDIA-docker](https://github.com/NVIDIA/nvidia-docker) 15 | 16 | Nvidia Drivers 17 | 18 | 19 | ## Build 20 | 21 | `sudo docker build -t paperspace/fastai .` 22 | 23 | ## Pre-built runtimes 24 | 25 | You can also just run the following without having to build the entire container yourself. This will pull the container from Docker Hub. 26 | 27 | `sudo docker run --gpus all -d -p 8888:8888 paperspace/fastai:2.0-CUDA9.2-base-3.0-v0.0.11-jupyterlab` 28 | -------------------------------------------------------------------------------- /older-versions/fastai-v3/config.yml: -------------------------------------------------------------------------------- 1 | data_path: /storage 2 | 3 | -------------------------------------------------------------------------------- /older-versions/fastai-v3/environment.yaml: -------------------------------------------------------------------------------- 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 | - fastai2 13 | - jupyter 14 | - jupyterlab 15 | - pip: 16 | - nvidia-ml-py3 17 | - dataclasses 18 | -------------------------------------------------------------------------------- /older-versions/fastai-v3/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source activate fastai 3 | ln -s /storage /notebooks/course-v3/nbs/dl1/data 4 | jupyter notebook --ip=0.0.0.0 --no-browser --allow-root 5 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab-debugger/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:9.2-base-ubuntu16.04 2 | # See http://bugs.python.org/issue19846 3 | ENV LANG C.UTF-8 4 | LABEL com.nvidia.volumes.needed="nvidia_driver" 5 | 6 | RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends \ 9 | build-essential \ 10 | cmake \ 11 | git \ 12 | curl \ 13 | vim \ 14 | ca-certificates \ 15 | python-qt4 \ 16 | libjpeg-dev \ 17 | zip \ 18 | unzip \ 19 | libpng-dev &&\ 20 | rm -rf /var/lib/apt/lists/* 21 | 22 | RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - 23 | RUN apt-get install -y nodejs 24 | 25 | ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 26 | ENV PYTHON_VERSION=3.6 27 | 28 | RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ 29 | chmod +x ~/miniconda.sh && \ 30 | ~/miniconda.sh -b -p /opt/conda && \ 31 | rm ~/miniconda.sh && \ 32 | /opt/conda/bin/conda install conda-build 33 | 34 | ENV PATH=$PATH:/opt/conda/bin/ 35 | ENV USER fastai 36 | # Create Environment 37 | COPY environment.yaml /environment.yaml 38 | RUN conda env create -f environment.yaml 39 | 40 | WORKDIR /notebooks 41 | # Activate Source 42 | CMD source activate fastai 43 | CMD source ~/.bashrc 44 | 45 | RUN chmod -R a+w /notebooks 46 | COPY debugger_install.sh /debugger_install.sh 47 | RUN /debugger_install.sh 48 | 49 | WORKDIR /notebooks 50 | 51 | # Clone course-v4 52 | RUN git clone https://github.com/fastai/course-v4.git 53 | 54 | COPY config.yml /root/.fastai/config.yml 55 | COPY run.sh /run.sh 56 | 57 | CMD ["/run.sh"] 58 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab-debugger/Instructions.md: -------------------------------------------------------------------------------- 1 | # Fast.ai Deep Learning Course v3 on Gradient Notebooks 2 | 3 | This is a quick guide to starting Part 3 of the fast.ai course Practical Deep Learning for Coders using Gradient Notebooks. With Gradient, you get quick access to a Jupyter instance (Lab or Notebook) without having to set up a virtual machine. Paperspace is a GPU-accelerated cloud platform 4 | 5 | ### Summary of Charges 6 | There are no storage fees associated with using Gradient Notebooks. Users pay hourly usage fees for the time that their Notebooks are Running. The hourly rate is dependent on the Compute Type selected, see all available types [here](https://support.paperspace.com/hc/en-us/articles/360002484474-Gradient-Pricing). Notebooks must be stopped to end billing. Learn more about Gradient billing [here](https://support.paperspace.com/hc/en-us/articles/360001369914-How-Does-Gradient-Billing-Work-). 7 | 8 | ## Getting Set Up 9 | ### Step 1: Create a Paperspace Account 10 | If you haven't already, you'll need to sign up for Paperspace [here](https://www.paperspace.com/account/signup). Confirm your account using the link in the email you receive from Paperspace. [Sign in to Paperspace](https://www.paperspace.com/account/login). 11 | 12 | ![image](https://user-images.githubusercontent.com/585865/47126635-76af7c80-d257-11e8-8f33-b34be1ae8ef3.png) 13 | 14 | 15 | ### Step 2: Access Gradient & Create Notebook 16 | I. On the left-hand side of your Console under Gradient, select Notebooks. 17 | 18 | II. Select the *Fast.ai 1.0 / PyTorch 1.0 BETA* base container. 19 | 20 | **Note: for Pro users, learn more about this docker container at the [paperspace/fastai-docker repo](https://github.com/Paperspace/fastai-docker/tree/fastai/pytorch1.0)** 21 | 22 | ![image](https://user-images.githubusercontent.com/585865/47126835-719efd00-d258-11e8-8d8d-b402ef8baecc.png) 23 | 24 | 25 | III. Select your Compute Type. 26 | 27 | ![](https://support.paperspace.com/hc/article_attachments/360006919793/mceclip0.png) 28 | 29 | IV. Name your Notebook. 30 | 31 | V. Enter your payment details (if you're new to Paperspace). Even if you have a promo or referral code, all active Paperspace accounts must have a valid credit card on file. You'll be able to enter your promo code later. 32 | 33 | VI. Click Create Notebook 34 | 35 | When you click Create Notebook, that will start your Notebook and your billing for utilization will begin. To stop billing, you must stop your Notebook. Notebooks will automatically shut down after 12 hours. 36 | 37 | You'll be taken to your Notebook details page in your Console, where your Notebook will be created. It will go straight from Pending to Running, and will be ready to use. 38 | 39 | ### Step 3: Stopping your Notebook 40 | Under Action, just click stop. This will end the billing session. 41 | 42 | ![image](https://user-images.githubusercontent.com/585865/47126987-29340f00-d259-11e8-8432-10e47d3edbe0.png) 43 | 44 | ### Step 4: Restart your Notebook 45 | Click Start to pick up where you left off, and/or choose a different VM type on which you'd like to run your Notebook. 46 | 47 | --- 48 | 49 | The Compute Type of your Notebook can be changed when you start it. What this means for you is that you can prepare your work inexpensively and add a GPU when you're ready to run your model/algorithm. 50 | 51 | ![](https://support.paperspace.com/hc/article_attachments/360012358634/mceclip0.png) 52 | 53 | ## Managing Data 54 | Fast.ai data files (dogscats) can be found in the 'datasets' folder. Files in this directory are hosted by Paperspace and are read-only. See [Public Datasets](https://support.paperspace.com/hc/en-us/articles/360003092514-Public-Datasets) for more info. 55 | 56 | The `storage` folder is your [Persistent Storage](https://support.paperspace.com/hc/en-us/articles/360001468133-Persistent-Storage). Files placed here are available across runs of Paperspace Jobs, Notebooks, and Linux machines. Empty by default, this repository is meant to store training datasets. 57 | 58 | The rest of the files in the notebooks directories will be available as Artifacts when your notebook is stopped. 59 | 60 | ## Wrapping up 61 | Paperspace provides $10 of Gradient credit to start you off on your course. This code is to be used for fast.ai students only. In your console, click on Billing in the left-hand menu and enter the promo code at the bottom right. The promo code for this course is: *FASTAIGR45T*. 62 | 63 | Note: If you opt for a Gradient 1 Subscription, promotional credit does not apply. Learn more about Gradient Subscription levels here. 64 | 65 | Questions or issues related to course content, we recommend posting in the [fast.ai forum](http://forums.fast.ai/). 66 | 67 | For Paperspace-specific support, check out the rest of the Gradient Help Center or submit a support ticket with [this form](https://support.paperspace.com/hc/en-us/requests/new). 68 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab-debugger/README.md: -------------------------------------------------------------------------------- 1 | # Paperspace + Fast.ai Docker files 2 | 3 | *JupyterLab + debugger version* 4 | 5 | ## Overview 6 | 7 | This is a docker build file designed to work with [Paperspace]. The latest pre-built runtimes are pushed here: https://hub.docker.com/r/paperspace/fastai/ 8 | 9 | This container pulls the latest fast.ai class. You can find this repo here: https://github.com/fastai/fastai and you can learn more about the Fast.ai course here: http://course.fast.ai/ 10 | 11 | ## Requirements: 12 | 13 | [Docker CE](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) 14 | 15 | [NVIDIA-docker](https://github.com/NVIDIA/nvidia-docker) 16 | 17 | Nvidia Drivers 18 | 19 | 20 | ## Build 21 | 22 | `sudo docker build -t paperspace/fastai .` 23 | 24 | ## Pre-built runtimes 25 | 26 | You can also just run the following without having to build the entire container yourself. This will pull the container from Docker Hub. 27 | 28 | `sudo docker run --gpus all -d -p 8888:8888 paperspace/fastai:1.0-CUDA9.2-base-3.0-v1.0.6` 29 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab-debugger/config.yml: -------------------------------------------------------------------------------- 1 | archive_path: /storage/archive/ 2 | data_path: /storage/data/ 3 | model_path: /storage/models/ 4 | storage_path: /storage/data/ 5 | version: 2 6 | 7 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab-debugger/debugger_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source activate fastai 4 | jupyter labextension install @jupyterlab/debugger @jupyter-widgets/jupyterlab-manager 5 | jupyter nbextension enable --py widgetsnbextension 6 | 7 | rm -f /debugger_install.sh 8 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab-debugger/environment.yaml: -------------------------------------------------------------------------------- 1 | name: fastai 2 | channels: 3 | - conda-forge 4 | - pytorch 5 | - fastai 6 | - defaults 7 | dependencies: 8 | - pytorch>=1.3.0 9 | - torchvision>=0.5 10 | - matplotlib 11 | - cuda92 12 | - fastprogress>=0.1.22 13 | - fastai 14 | - jupyter 15 | - jupyterlab 16 | - pandas 17 | - requests 18 | - pyyaml 19 | - pillow 20 | - python>=3.6 21 | - pip 22 | - scikit-learn 23 | - scipy 24 | - spacy 25 | - graphviz 26 | - graphite2 27 | - xeus-python 28 | - pip: 29 | - nvidia-ml-py3 30 | - dataclasses 31 | - fastai2 32 | - fastprocess 33 | - utils 34 | - graphviz 35 | - ipywidgets>=7.5.1 36 | - nbdev 37 | - azure-cognitiveservices-search-imagesearch 38 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab-debugger/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source activate fastai 3 | mkdir /storage/data 4 | rm -rf /storage/lost+found 5 | ln -s /datasets/fastai/* /storage/data/ 6 | jupyter lab --ip=0.0.0.0 --no-browser --allow-root 7 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:9.2-base-ubuntu16.04 2 | # See http://bugs.python.org/issue19846 3 | ENV LANG C.UTF-8 4 | LABEL com.nvidia.volumes.needed="nvidia_driver" 5 | 6 | RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends \ 9 | build-essential \ 10 | cmake \ 11 | git \ 12 | curl \ 13 | vim \ 14 | ca-certificates \ 15 | python-qt4 \ 16 | libjpeg-dev \ 17 | zip \ 18 | unzip \ 19 | libpng-dev &&\ 20 | rm -rf /var/lib/apt/lists/* 21 | 22 | ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 23 | ENV PYTHON_VERSION=3.6 24 | 25 | RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ 26 | chmod +x ~/miniconda.sh && \ 27 | ~/miniconda.sh -b -p /opt/conda && \ 28 | rm ~/miniconda.sh && \ 29 | /opt/conda/bin/conda install conda-build 30 | 31 | ENV PATH=$PATH:/opt/conda/bin/ 32 | ENV USER fastai 33 | # Create Environment 34 | COPY environment.yaml /environment.yaml 35 | RUN conda env create -f environment.yaml 36 | 37 | WORKDIR /notebooks 38 | # Activate Source 39 | CMD source activate fastai 40 | CMD source ~/.bashrc 41 | 42 | RUN chmod -R a+w /notebooks 43 | WORKDIR /notebooks 44 | 45 | # Clone course-v4 46 | RUN git clone https://github.com/fastai/course-v4.git 47 | 48 | COPY config.yml /root/.fastai/config.yml 49 | COPY run.sh /run.sh 50 | 51 | CMD ["/run.sh"] 52 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab/Instructions.md: -------------------------------------------------------------------------------- 1 | # Fast.ai Deep Learning Course v3 on Gradient Notebooks 2 | 3 | This is a quick guide to starting Part 3 of the fast.ai course Practical Deep Learning for Coders using Gradient Notebooks. With Gradient, you get quick access to a Jupyter instance (Lab or Notebook) without having to set up a virtual machine. Paperspace is a GPU-accelerated cloud platform 4 | 5 | ### Summary of Charges 6 | There are no storage fees associated with using Gradient Notebooks. Users pay hourly usage fees for the time that their Notebooks are Running. The hourly rate is dependent on the Compute Type selected, see all available types [here](https://support.paperspace.com/hc/en-us/articles/360002484474-Gradient-Pricing). Notebooks must be stopped to end billing. Learn more about Gradient billing [here](https://support.paperspace.com/hc/en-us/articles/360001369914-How-Does-Gradient-Billing-Work-). 7 | 8 | ## Getting Set Up 9 | ### Step 1: Create a Paperspace Account 10 | If you haven't already, you'll need to sign up for Paperspace [here](https://www.paperspace.com/account/signup). Confirm your account using the link in the email you receive from Paperspace. [Sign in to Paperspace](https://www.paperspace.com/account/login). 11 | 12 | ![image](https://user-images.githubusercontent.com/585865/47126635-76af7c80-d257-11e8-8f33-b34be1ae8ef3.png) 13 | 14 | 15 | ### Step 2: Access Gradient & Create Notebook 16 | I. On the left-hand side of your Console under Gradient, select Notebooks. 17 | 18 | II. Select the *Fast.ai 1.0 / PyTorch 1.0 BETA* base container. 19 | 20 | **Note: for Pro users, learn more about this docker container at the [paperspace/fastai-docker repo](https://github.com/Paperspace/fastai-docker/tree/fastai/pytorch1.0)** 21 | 22 | ![image](https://user-images.githubusercontent.com/585865/47126835-719efd00-d258-11e8-8d8d-b402ef8baecc.png) 23 | 24 | 25 | III. Select your Compute Type. 26 | 27 | ![](https://support.paperspace.com/hc/article_attachments/360006919793/mceclip0.png) 28 | 29 | IV. Name your Notebook. 30 | 31 | V. Enter your payment details (if you're new to Paperspace). Even if you have a promo or referral code, all active Paperspace accounts must have a valid credit card on file. You'll be able to enter your promo code later. 32 | 33 | VI. Click Create Notebook 34 | 35 | When you click Create Notebook, that will start your Notebook and your billing for utilization will begin. To stop billing, you must stop your Notebook. Notebooks will automatically shut down after 12 hours. 36 | 37 | You'll be taken to your Notebook details page in your Console, where your Notebook will be created. It will go straight from Pending to Running, and will be ready to use. 38 | 39 | ### Step 3: Stopping your Notebook 40 | Under Action, just click stop. This will end the billing session. 41 | 42 | ![image](https://user-images.githubusercontent.com/585865/47126987-29340f00-d259-11e8-8432-10e47d3edbe0.png) 43 | 44 | ### Step 4: Restart your Notebook 45 | Click Start to pick up where you left off, and/or choose a different VM type on which you'd like to run your Notebook. 46 | 47 | --- 48 | 49 | The Compute Type of your Notebook can be changed when you start it. What this means for you is that you can prepare your work inexpensively and add a GPU when you're ready to run your model/algorithm. 50 | 51 | ![](https://support.paperspace.com/hc/article_attachments/360012358634/mceclip0.png) 52 | 53 | ## Managing Data 54 | Fast.ai data files (dogscats) can be found in the 'datasets' folder. Files in this directory are hosted by Paperspace and are read-only. See [Public Datasets](https://support.paperspace.com/hc/en-us/articles/360003092514-Public-Datasets) for more info. 55 | 56 | The `storage` folder is your [Persistent Storage](https://support.paperspace.com/hc/en-us/articles/360001468133-Persistent-Storage). Files placed here are available across runs of Paperspace Jobs, Notebooks, and Linux machines. Empty by default, this repository is meant to store training datasets. 57 | 58 | The rest of the files in the notebooks directories will be available as Artifacts when your notebook is stopped. 59 | 60 | ## Wrapping up 61 | Paperspace provides $10 of Gradient credit to start you off on your course. This code is to be used for fast.ai students only. In your console, click on Billing in the left-hand menu and enter the promo code at the bottom right. The promo code for this course is: *FASTAIGR45T*. 62 | 63 | Note: If you opt for a Gradient 1 Subscription, promotional credit does not apply. Learn more about Gradient Subscription levels here. 64 | 65 | Questions or issues related to course content, we recommend posting in the [fast.ai forum](http://forums.fast.ai/). 66 | 67 | For Paperspace-specific support, check out the rest of the Gradient Help Center or submit a support ticket with [this form](https://support.paperspace.com/hc/en-us/requests/new). 68 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab/README.md: -------------------------------------------------------------------------------- 1 | # Paperspace + Fast.ai Docker files 2 | 3 | *JupyterLab version* 4 | 5 | ## Overview 6 | 7 | This is a docker build file designed to work with [Paperspace]. The latest pre-built runtimes are pushed here: https://hub.docker.com/r/paperspace/fastai/ 8 | 9 | This container pulls the latest fast.ai class. You can find this repo here: https://github.com/fastai/fastai and you can learn more about the Fast.ai course here: http://course.fast.ai/ 10 | 11 | ## Requirements: 12 | 13 | [Docker CE](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) 14 | 15 | [NVIDIA-docker](https://github.com/NVIDIA/nvidia-docker) 16 | 17 | Nvidia Drivers 18 | 19 | 20 | ## Build 21 | 22 | `sudo docker build -t paperspace/fastai .` 23 | 24 | ## Pre-built runtimes 25 | 26 | You can also just run the following without having to build the entire container yourself. This will pull the container from Docker Hub. 27 | 28 | `sudo docker run --gpus all -d -p 8888:8888 paperspace/fastai:2.0-CUDA9.2-complete-4.0-v0.0.15-lab /run.sh` 29 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab/config.yml: -------------------------------------------------------------------------------- 1 | archive_path: /storage/archive/ 2 | data_path: /storage/data/ 3 | model_path: /storage/models/ 4 | storage_path: /storage/data/ 5 | version: 2 6 | 7 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab/environment.yaml: -------------------------------------------------------------------------------- 1 | name: fastai 2 | channels: 3 | - conda-forge 4 | - pytorch 5 | - fastai 6 | - defaults 7 | dependencies: 8 | - pytorch>=1.3.0 9 | - torchvision>=0.5 10 | - matplotlib 11 | - cuda92 12 | - fastprogress>=0.1.22 13 | - fastai 14 | - jupyter 15 | - jupyterlab 16 | - pandas 17 | - requests 18 | - pyyaml 19 | - pillow 20 | - python>=3.6 21 | - pip 22 | - scikit-learn 23 | - scipy 24 | - spacy 25 | - graphviz 26 | - graphite2 27 | - pip: 28 | - nvidia-ml-py3 29 | - dataclasses 30 | - fastai2 31 | - fastprocess 32 | - utils 33 | - graphviz 34 | - ipywidgets>=7.5.1 35 | - nbdev 36 | - azure-cognitiveservices-search-imagesearch 37 | -------------------------------------------------------------------------------- /older-versions/fastai-v4-lab/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source activate fastai 3 | mkdir /storage/data 4 | rm -rf /storage/lost+found 5 | ln -s /datasets/fastai/* /storage/data/ 6 | jupyter lab --ip=0.0.0.0 --no-browser --allow-root 7 | -------------------------------------------------------------------------------- /older-versions/fastai-v4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:9.2-base-ubuntu16.04 2 | # See http://bugs.python.org/issue19846 3 | ENV LANG C.UTF-8 4 | LABEL com.nvidia.volumes.needed="nvidia_driver" 5 | 6 | RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends \ 9 | build-essential \ 10 | cmake \ 11 | git \ 12 | curl \ 13 | vim \ 14 | ca-certificates \ 15 | python-qt4 \ 16 | libjpeg-dev \ 17 | zip \ 18 | unzip \ 19 | libpng-dev &&\ 20 | rm -rf /var/lib/apt/lists/* 21 | 22 | ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 23 | ENV PYTHON_VERSION=3.6 24 | 25 | RUN curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ 26 | chmod +x ~/miniconda.sh && \ 27 | ~/miniconda.sh -b -p /opt/conda && \ 28 | rm ~/miniconda.sh && \ 29 | /opt/conda/bin/conda install conda-build 30 | 31 | ENV PATH=$PATH:/opt/conda/bin/ 32 | ENV USER fastai 33 | # Create Environment 34 | COPY environment.yaml /environment.yaml 35 | RUN conda env create -f environment.yaml 36 | 37 | WORKDIR /notebooks 38 | # Activate Source 39 | CMD source activate fastai 40 | CMD source ~/.bashrc 41 | 42 | RUN chmod -R a+w /notebooks 43 | WORKDIR /notebooks 44 | 45 | # Clone course-v4 46 | RUN git clone https://github.com/fastai/course-v4.git 47 | 48 | COPY config.yml /root/.fastai/config.yml 49 | COPY run.sh /run.sh 50 | 51 | CMD ["/run.sh"] 52 | -------------------------------------------------------------------------------- /older-versions/fastai-v4/Instructions.md: -------------------------------------------------------------------------------- 1 | # Fast.ai Deep Learning Course v3 on Gradient Notebooks 2 | 3 | This is a quick guide to starting Part 3 of the fast.ai course Practical Deep Learning for Coders using Gradient Notebooks. With Gradient, you get quick access to a Jupyter instance (Lab or Notebook) without having to set up a virtual machine. Paperspace is a GPU-accelerated cloud platform 4 | 5 | ### Summary of Charges 6 | There are no storage fees associated with using Gradient Notebooks. Users pay hourly usage fees for the time that their Notebooks are Running. The hourly rate is dependent on the Compute Type selected, see all available types [here](https://support.paperspace.com/hc/en-us/articles/360002484474-Gradient-Pricing). Notebooks must be stopped to end billing. Learn more about Gradient billing [here](https://support.paperspace.com/hc/en-us/articles/360001369914-How-Does-Gradient-Billing-Work-). 7 | 8 | ## Getting Set Up 9 | ### Step 1: Create a Paperspace Account 10 | If you haven't already, you'll need to sign up for Paperspace [here](https://www.paperspace.com/account/signup). Confirm your account using the link in the email you receive from Paperspace. [Sign in to Paperspace](https://www.paperspace.com/account/login). 11 | 12 | ![image](https://user-images.githubusercontent.com/585865/47126635-76af7c80-d257-11e8-8f33-b34be1ae8ef3.png) 13 | 14 | 15 | ### Step 2: Access Gradient & Create Notebook 16 | I. On the left-hand side of your Console under Gradient, select Notebooks. 17 | 18 | II. Select the *Fast.ai 1.0 / PyTorch 1.0 BETA* base container. 19 | 20 | **Note: for Pro users, learn more about this docker container at the [paperspace/fastai-docker repo](https://github.com/Paperspace/fastai-docker/tree/fastai/pytorch1.0)** 21 | 22 | ![image](https://user-images.githubusercontent.com/585865/47126835-719efd00-d258-11e8-8d8d-b402ef8baecc.png) 23 | 24 | 25 | III. Select your Compute Type. 26 | 27 | ![](https://support.paperspace.com/hc/article_attachments/360006919793/mceclip0.png) 28 | 29 | IV. Name your Notebook. 30 | 31 | V. Enter your payment details (if you're new to Paperspace). Even if you have a promo or referral code, all active Paperspace accounts must have a valid credit card on file. You'll be able to enter your promo code later. 32 | 33 | VI. Click Create Notebook 34 | 35 | When you click Create Notebook, that will start your Notebook and your billing for utilization will begin. To stop billing, you must stop your Notebook. Notebooks will automatically shut down after 12 hours. 36 | 37 | You'll be taken to your Notebook details page in your Console, where your Notebook will be created. It will go straight from Pending to Running, and will be ready to use. 38 | 39 | ### Step 3: Stopping your Notebook 40 | Under Action, just click stop. This will end the billing session. 41 | 42 | ![image](https://user-images.githubusercontent.com/585865/47126987-29340f00-d259-11e8-8432-10e47d3edbe0.png) 43 | 44 | ### Step 4: Restart your Notebook 45 | Click Start to pick up where you left off, and/or choose a different VM type on which you'd like to run your Notebook. 46 | 47 | --- 48 | 49 | The Compute Type of your Notebook can be changed when you start it. What this means for you is that you can prepare your work inexpensively and add a GPU when you're ready to run your model/algorithm. 50 | 51 | ![](https://support.paperspace.com/hc/article_attachments/360012358634/mceclip0.png) 52 | 53 | ## Managing Data 54 | Fast.ai data files (dogscats) can be found in the 'datasets' folder. Files in this directory are hosted by Paperspace and are read-only. See [Public Datasets](https://support.paperspace.com/hc/en-us/articles/360003092514-Public-Datasets) for more info. 55 | 56 | The `storage` folder is your [Persistent Storage](https://support.paperspace.com/hc/en-us/articles/360001468133-Persistent-Storage). Files placed here are available across runs of Paperspace Jobs, Notebooks, and Linux machines. Empty by default, this repository is meant to store training datasets. 57 | 58 | The rest of the files in the notebooks directories will be available as Artifacts when your notebook is stopped. 59 | 60 | ## Wrapping up 61 | Paperspace provides $10 of Gradient credit to start you off on your course. This code is to be used for fast.ai students only. In your console, click on Billing in the left-hand menu and enter the promo code at the bottom right. The promo code for this course is: *FASTAIGR45T*. 62 | 63 | Note: If you opt for a Gradient 1 Subscription, promotional credit does not apply. Learn more about Gradient Subscription levels here. 64 | 65 | Questions or issues related to course content, we recommend posting in the [fast.ai forum](http://forums.fast.ai/). 66 | 67 | For Paperspace-specific support, check out the rest of the Gradient Help Center or submit a support ticket with [this form](https://support.paperspace.com/hc/en-us/requests/new). 68 | -------------------------------------------------------------------------------- /older-versions/fastai-v4/README.md: -------------------------------------------------------------------------------- 1 | # Paperspace + Fast.ai Docker files 2 | 3 | 4 | ## Overview 5 | 6 | This is a docker build file designed to work with [Paperspace]. The latest pre-built runtimes are pushed here: https://hub.docker.com/r/paperspace/fastai/ 7 | 8 | This container pulls the latest fast.ai class. You can find this repo here: https://github.com/fastai/fastai and you can learn more about the Fast.ai course here: http://course.fast.ai/ 9 | 10 | ## Requirements: 11 | 12 | [Docker CE](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) 13 | 14 | [NVIDIA-docker](https://github.com/NVIDIA/nvidia-docker) 15 | 16 | Nvidia Drivers 17 | 18 | 19 | ## Build 20 | 21 | `sudo docker build -t paperspace/fastai .` 22 | 23 | ## Pre-built runtimes 24 | 25 | You can also just run the following without having to build the entire container yourself. This will pull the container from Docker Hub. 26 | 27 | `sudo docker run --gpus all -d -p 8888:8888 paperspace/fastai:2.0-CUDA9.2-complete-4.0-v0.0.12 /run.sh` 28 | -------------------------------------------------------------------------------- /older-versions/fastai-v4/config.yml: -------------------------------------------------------------------------------- 1 | archive_path: /storage/archive/ 2 | data_path: /storage/data/ 3 | model_path: /storage/models/ 4 | storage_path: /storage/data/ 5 | version: 2 6 | 7 | -------------------------------------------------------------------------------- /older-versions/fastai-v4/environment.yaml: -------------------------------------------------------------------------------- 1 | name: fastai 2 | channels: 3 | - conda-forge 4 | - pytorch 5 | - fastai 6 | - defaults 7 | dependencies: 8 | - pytorch>=1.3.0 9 | - torchvision>=0.5 10 | - matplotlib 11 | - cuda92 12 | - fastprogress>=0.1.22 13 | - fastai 14 | - jupyter 15 | - pandas 16 | - requests 17 | - pyyaml 18 | - pillow 19 | - python>=3.6 20 | - pip 21 | - scikit-learn 22 | - scipy 23 | - spacy 24 | - graphviz 25 | - graphite2 26 | - pip: 27 | - nvidia-ml-py3 28 | - dataclasses 29 | - fastai2 30 | - fastprocess 31 | - utils 32 | - graphviz 33 | - ipywidgets>=7.5.1 34 | - nbdev 35 | - azure-cognitiveservices-search-imagesearch 36 | -------------------------------------------------------------------------------- /older-versions/fastai-v4/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source activate fastai 3 | mkdir /storage/data 4 | rm -rf /storage/lost+found 5 | ln -s /datasets/fastai/* /storage/data/ 6 | jupyter notebook --ip=0.0.0.0 --no-browser --allow-root 7 | --------------------------------------------------------------------------------