-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: pytorch base image with python 3.8.19
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 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 |
---|---|---|
@@ -1,17 +1,22 @@ | ||
# Use the official Python 3.8 image as the base image | ||
FROM python:3.8 | ||
FROM pytorch/pytorch:2.3.1-cuda11.8-cudnn8-devel | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Copy the source code into the container | ||
COPY src /app/src | ||
|
||
# Update Python to 3.8.19 | ||
RUN conda update -n base -c defaults conda && \ | ||
conda install -y python=3.8.19 && \ | ||
conda update --all --yes | ||
|
||
# Copy the requirements.txt file into the container | ||
COPY requirements.txt /app | ||
|
||
# Install the Python dependencies | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
RUN /opt/conda/bin/pip install --no-cache-dir -r requirements.txt | ||
|
||
# Set the entrypoint to start the main.py script | ||
CMD ["python", "src/main.py", "us", "--file", "/app/data/unchained.sock"] |