Skip to content

Commit 802116b

Browse files
authored
Update data-science.md
1 parent 7131f9b commit 802116b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

linux/data-science.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,40 @@ sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi
2525
```
2626

2727
## Build custom Docker image for jupyterlab
28+
29+
```Dockerfile
30+
FROM nvidia/cuda:11.2.0-devel-ubuntu20.04
31+
32+
ENV PATH="/root/miniconda3/bin:${PATH}"
33+
ARG PATH="/root/miniconda3/bin:${PATH}"
34+
RUN apt-get update
35+
36+
37+
# declare the image name
38+
ENV IMG_NAME=11.2.0-devel-ubuntu20.04 \
39+
# declare what jaxlib tag to use
40+
# if a CI/CD system is expected to pass in these arguments
41+
# the dockerfile should be modified accordingly
42+
JAXLIB_VERSION=0.3.0
43+
44+
RUN apt-get install -y wget libsndfile1 python3-pip sox libsox-fmt-mp3 zsh tmux nmon vim && rm -rf /var/lib/apt/lists/*
45+
RUN pip3 install numpy scipy six wheel jaxlib==${JAXLIB_VERSION}+cuda11.cudnn82 -f https://storage.googleapis.com/jax-releases/jax_releases.html jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_releases.html
46+
47+
48+
RUN wget \
49+
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
50+
&& mkdir /root/.conda \
51+
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
52+
&& rm -f Miniconda3-latest-Linux-x86_64.sh
53+
RUN conda --version
54+
RUN conda install -c conda-forge jupyterlab pytorch torchvision gdown tqdm
55+
56+
WORKDIR /content
57+
58+
ENTRYPOINT ["jupyter-lab"]
59+
CMD ["--allow-root", "--ip=0.0.0.0"]
60+
```
61+
2862
## Install minicuda
2963

3064
## Install Dependencies

0 commit comments

Comments
 (0)