-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Docker file for modern Gpu like RTX 4090
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
FROM nvidia/cuda:11.8.0-base-ubuntu20.04 | ||
|
||
ENV PYTHON_VERSION=3.8 | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -qq update \ | ||
&& apt-get -qq install --no-install-recommends \ | ||
libsndfile1-dev \ | ||
git \ | ||
python${PYTHON_VERSION} \ | ||
python${PYTHON_VERSION}-venv \ | ||
python3-pip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \ | ||
ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python && \ | ||
ln -s -f /usr/bin/pip3 /usr/bin/pip | ||
|
||
RUN pip install --upgrade pip | ||
|
||
# 2. Copy files | ||
COPY . /src | ||
|
||
RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 | ||
|
||
WORKDIR /src | ||
# 3. Install dependencies | ||
RUN pip install -r requirements-docker.txt | ||
|
||
RUN python3 setup.py install |