-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
4155135
commit 28fa30f
Showing
1 changed file
with
11 additions
and
7 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,15 +1,19 @@ | ||
# Use an official Python runtime with NVIDIA CUDA support | ||
# Use an official Python runtime as a parent image | ||
FROM python:3.9-slim | ||
|
||
# Set the working directory in the container | ||
WORKDIR /code | ||
|
||
WORKDIR /app | ||
# Copy the current directory contents into the container at /code | ||
COPY ./app /code/app | ||
COPY requirements.txt /code/ | ||
|
||
# Copy your application files | ||
COPY . /app | ||
|
||
# Install Python and FastAPI dependencies | ||
# Install any needed packages specified in requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
ENV PYTHONPATH=/code | ||
EXPOSE 8000 | ||
|
||
CMD uvicorn main:app --port=${PORT:-8000} --host=0.0.0.0 | ||
# Run the application | ||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] | ||
|