Skip to content

Commit

Permalink
SERVICE: update Dockerfile and add requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzobalzani committed May 10, 2024
1 parent c0d8e21 commit 75a6475
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 38 deletions.
44 changes: 14 additions & 30 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ ENV DEBIAN_FRONTEND=noninteractive
# Set work directory
WORKDIR /workspace

# Define torch version
ARG TORCH_VERSION="2.2.0+cu118"
ARG TORCHVISION_VERSION="0.17.0+cu118"

# Install general-purpose packages
RUN apt-get update -y && \
apt-get install -y curl \
Expand All @@ -27,32 +23,20 @@ RUN apt-get update -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*

# Upgrade pip
RUN python3.9 -m pip install --upgrade pip

# Install project dependencies
RUN python3.9 -m pip install \
torch==$TORCH_VERSION torchvision==$TORCHVISION_VERSION torchaudio==$TORCH_VERSION -f https://download.pytorch.org/whl/cu118/torch_stable.html \
git+https://github.com/huggingface/transformers \
pykeen==1.10.1 \
scikit-learn==1.3.1 \
networkx \
huggingface_hub \
datasets \
evaluate \
nvidia-ml-py3 \
accelerate \
sentence-transformers \
nltk \
tqdm \
wget \
gdown \
wrapt -U --ignore-installed

# Install RAPIDS dependencies
RUN python3.9 -m pip install \
cudf-cu11 --extra-index-url https://pypi.nvidia.com \
cugraph-cu11 --extra-index-url=https://pypi.nvidia.com
COPY requirements.txt .

# Install project dependens
RUN python3.9 -m pip install -r requirements.txt

# Install CUDA packages
## Install correct PyTorch packages
ARG TORCH_VERSION="2.2.0+cu118"
ARG TORCHVISION_VERSION="0.17.0+cu118"
RUN python3.9 -m pip install torch==$TORCH_VERSION torchvision==$TORCHVISION_VERSION \
torchaudio==$TORCH_VERSION -f https://download.pytorch.org/whl/cu118/torch_stable.html

## Install RAPIDS dependencies
RUN python3.9 -m pip install cudf-cu11 cugraph-cu11 --extra-index-url https://pypi.nvidia.com

# Back to default frontend
ENV DEBIAN_FRONTEND=dialog
14 changes: 6 additions & 8 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
torch==2.2.0+cu118
torchvision==0.17.0+cu118
torchaudio==2.2.0+cu118
git+https://github.com/huggingface/transformers
pip
torch
torchvision
torchaudio
wrapt==1.12.1
pykeen==1.10.1
scikit-learn==1.3.1
git+https://github.com/huggingface/transformers
networkx
huggingface_hub
datasets
Expand All @@ -15,7 +17,3 @@ nltk
tqdm
wget
gdown
wrapt==1.12.1
-i https://pypi.nvidia.com
cudf-cu11
cugraph-cu11

0 comments on commit 75a6475

Please sign in to comment.