Skip to content

Commit

Permalink
Install CUDA toolkit in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
thainguyensunya committed Dec 7, 2024
1 parent 6e3ba32 commit 7c736f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/gcp_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:

runs-on: ubuntu-latest
steps:
# To workaround "no space left on device" issue of GitHub-hosted runner
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache

- name: Checkout
uses: actions/checkout@v4

Expand Down
9 changes: 8 additions & 1 deletion backend/modal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ FROM python:3.11-slim
WORKDIR /app
ENV PATH="/opt/venv/bin:$PATH"

RUN apt-get update && apt-get -y install ffmpeg curl unzip && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get -y install build-essential ffmpeg curl unzip wget software-properties-common && \
wget https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda-repo-debian11-12-6-local_12.6.3-560.35.05-1_amd64.deb && \
dpkg -i cuda-repo-debian11-12-6-local_12.6.3-560.35.05-1_amd64.deb && \
cp /var/cuda-repo-debian11-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/ && \
add-apt-repository contrib && \
apt-get update && \
apt-get -y install cuda-toolkit-12-6 && \
rm -rf /var/lib/apt/lists/* cuda-repo-debian11-12-6-local_12.6.3-560.35.05-1_amd64.deb

COPY --from=builder /opt/venv /opt/venv
COPY backend/modal/ .
Expand Down

0 comments on commit 7c736f2

Please sign in to comment.