generated from kyegomez/Python-Package-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kye
committed
Feb 9, 2024
1 parent
c6910d0
commit 4220ae4
Showing
2 changed files
with
25 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,22 @@ | ||
# Use the official PyTorch image as the base image | ||
FROM nvcr.io/nvidia/pytorch:24.01-py3 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the Python API script to the container | ||
COPY api.py /app/api.py | ||
|
||
# Copy the requirements file to the container | ||
COPY requirements.txt /app/requirements.txt | ||
|
||
# Set environment variables | ||
ENV WORLD_SIZE=4 | ||
ENV ARTIFACTS_PATH=/app/artifacts | ||
ENV STORAGE_PATH=/app/storage | ||
|
||
# Run the command to download the requirements | ||
RUN python -m pip install -r requirements.txt | ||
|
||
# Set the entrypoint command for the container | ||
CMD ["python", "api.py"] |
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