Skip to content

Commit

Permalink
install dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
muhac committed Nov 17, 2024
1 parent 960fe3b commit 841c72d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Use CUDA 12.4
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
FROM ubuntu:22.04
SHELL ["/bin/bash", "-c"]
ENV SHELL=/bin/bash
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -27,7 +26,7 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -

# Install Anaconda and JupyterLab
RUN eval "$('/root/anaconda/bin/conda' 'shell.bash' 'hook')" && \
conda create -n torch python=3.11 anaconda ipywidgets nodejs -y && \
conda create -n torch python=3.12 anaconda ipywidgets nodejs -y && \
echo "conda activate torch" >> /root/.bashrc && \
conda clean -a && pip cache purge

Expand Down Expand Up @@ -55,10 +54,8 @@ COPY JupyterLabConfig/channels.condarc /root/.condarc
# Install PyTorch and AI libs
RUN eval "$('/root/anaconda/bin/conda' 'shell.bash' 'hook')" && conda activate torch && \
conda install -c pytorch -c nvidia -c conda-forge --strict-channel-priority \
pytorch torchvision torchaudio pytorch-cuda=12.4 \
transformers datasets spacy xgboost \
django beautifulsoup4 && \
pip install opencv-python && \
pytorch torchvision torchaudio pytorch-cuda=12.4 && \
pip install openai==0.28 jsonlines && \
conda clean -a && pip cache purge

# Run JupyterLab on start
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ CUDA Docker environment is supported by [Ubuntu nvidia cuda toolkit](https://pac

## Available Tags

- `latest`: Most recent build directly from the latest `main` branch.
- `v2.x.x`: JupyterLab installed with PyTorch GPU version `2.x.x`.
- Branch names: Snapshots of the project environment; refer to the branch README for more information.
Docker image tag name: `env-2411b`.

Full list are available on [muhac/jupyter-pytorch | DockerHub](https://hub.docker.com/r/muhac/jupyter-pytorch).
This image is built for the development environment of the [U of T MAT1510](https://sites.google.com/view/mat1510) course (Fall 2024).

Project: [Towards Understanding Chain-of-Thought Prompting](https://github.com/muhac/understanding-chain-of-thought)

## Install & Usage

Expand All @@ -26,7 +26,7 @@ docker run --detach \
--ipc=host --runtime=nvidia --gpus all \
-p $SERVER_PORT:80 \
-v $PROJECT_DIR:/root/projects \
muhac/jupyter-pytorch:latest
muhac/jupyter-pytorch:env-2411b
```

You can use [this notebook](JupyterLabConfig/notebooks/PyTorchGPU.ipynb) to check your PyTorch GPU environment.
Expand Down

0 comments on commit 841c72d

Please sign in to comment.