Skip to content

Commit 7cd9ba1

Browse files
Adding dev container and doc
1 parent 572a12c commit 7cd9ba1

9 files changed

+92
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/devcontainers/python:0-3.10
2+
3+
COPY requirements.txt /tmp/
4+
5+
RUN echo "(*) Installing tools..." \
6+
&& su - vscode -c "pip install -r /tmp/requirements.txt" \
7+
&& apt-get update \
8+
&& apt-get -y install --no-install-recommends graphviz
9+
10+
ENV PATH="/home/vscode/.local/bin:${PATH}"
11+
12+
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt

.devcontainer/devcontainer.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// For more details, see https://aka.ms/devcontainer.json.
2+
{
3+
"build": {
4+
"context": ".",
5+
"dockerfile": "Dockerfile"
6+
},
7+
8+
// Uncomment to install NVIDIA CUDA - required for a GPU-powered codespace
9+
// "features": {
10+
// "ghcr.io/devcontainers/features/nvidia-cuda:1": {
11+
// "installCudnn": true
12+
// }
13+
// },
14+
15+
"hostRequirements": {
16+
"storage": "64gb"
17+
},
18+
"runArgs": [
19+
"--shm-size=16g"
20+
]
21+
}

.devcontainer/requirements.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
duckduckgo_search
2+
fastai
3+
fastkaggle
4+
gradio
5+
graphviz
6+
ipywidgets
7+
jupyterlab
8+
kaggle
9+
nbdev
10+
plotly
11+
seaborn
12+
statsmodels
13+
sympy
14+
timm
15+
torch
16+
torchvision
17+
transformers

.devcontainer/welcome-message.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
👋 Welcome to "Practical Deep Learning for Coders" in Codespaces!
2+
3+
🛠️ Your environment is fully setup with all the required softwares and machine learning libraries.
4+
5+
🚀 To get started, either open the notebook file in the VS Code editor,
6+
or open this Codespace with "Open in Jupyterlab" at https://github.com/codespaces
7+

01-jupyter-notebook-101.ipynb

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

05-linear-model-and-neural-net-from-scratch.ipynb

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ This is where you'll find the notebooks, slides, and spreadsheets for the 2022 e
99
- `xl`: Excel spreadsheets
1010
- `slides`: Jeremy's slide decks
1111
- `tools`: Ignore (tools for creating this repo)
12+
- `getting-started-with-codespaces`: A document to help run the notebooks in a GitHub Codespace

getting-started-with-codespaces.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Using Codespaces to work with the "Practical Deep Learning for Coders" course
2+
3+
4+
To get started, create a codespace for this repository by clicking this 👇
5+
6+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=485606685)
7+
8+
A codespace will open in a web-based version of Visual Studio Code.
9+
10+
**Note**: Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
11+
12+
## Opening a notebook
13+
14+
The [dev container](.devcontainer/devcontainer.json) is fully configured with softwares and [machine learning libraries](.devcontainer/requirements.txt) needed for this course.
15+
16+
In the VS Code editor, open any notebook file and start executing the notebook's cells.
17+
18+
## Opening your codespace in JupyterLab
19+
20+
You can open your codespace in JupyterLab from the "Your codespaces" page at [github.com/codespaces](https://github.com/codespaces), or by using [GitHub CLI](https://docs.github.com/en/codespaces/developing-in-codespaces/opening-an-existing-codespace?tool=cli#opening-an-existing-codespace) with `gh codespace jupyter`. For more information, see "[Opening an existing codespace](https://docs.github.com/en/codespaces/developing-in-codespaces/opening-an-existing-codespace)".
21+
22+
## GPU-powered Codespaces
23+
24+
GPU-powered Codespaces are now available in limited beta. Having access to a GPU from within a codespace allows developers to run complex Machine Learning models much more quickly.
25+
26+
To request access to the GPU machine types, or any additional machine type, [please complete the sign up form](https://github.surveymonkey.com/r/Y75GX9T).
27+
28+
Once, GPU is enabled and configured for your codespace, uncomment [this section](.devcontainer/devcontainer.json#L9-L13) which installs NVIDIA CUDA.
29+
30+
**Note**: Notebooks [09-small-models-road-to-the-top-part-2](09-small-models-road-to-the-top-part-2.ipynb) and [10-scaling-up-road-to-the-top-part-3](10-scaling-up-road-to-the-top-part-3.ipynb) requires a powerful machine to ensure that the kernel does not crash. Hence, some notebook cells for these two notebooks might not execute without a GPU-powered codespace.

slides/nlp-intro.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@
8787
]
8888
},
8989
{
90+
"attachments": {},
9091
"cell_type": "markdown",
9192
"id": "dc2e32d4",
9293
"metadata": {},
9394
"source": [
94-
"Kaggle limits your weekly time using a GPU machine. The limits are very generous, but you may well still find it's not enough! In that case, you'll want to use your own GPU server, or a cloud server such as Colab, Paperspace Gradient, or SageMaker Studio Lab (all of which have free options). To do so, you'll need to be able to download Kaggle datasets.\n",
95+
"Kaggle limits your weekly time using a GPU machine. The limits are very generous, but you may well still find it's not enough! In that case, you'll want to use your own GPU server, or a cloud server such as GitHub Codespaces, Colab, Paperspace Gradient, or SageMaker Studio Lab (all of which have free options). To do so, you'll need to be able to download Kaggle datasets.\n",
9596
"\n",
9697
"The easiest way to download Kaggle datasets is to use the Kaggle API. You can install this using `pip` by running this in a notebook cell:\n",
9798
"\n",

0 commit comments

Comments
 (0)