Skip to content

Commit 28fa30f

Browse files
committed
UPDATE
1 parent 4155135 commit 28fa30f

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

backend/Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# Use an official Python runtime with NVIDIA CUDA support
1+
# Use an official Python runtime as a parent image
22
FROM python:3.9-slim
33

4+
# Set the working directory in the container
5+
WORKDIR /code
46

5-
WORKDIR /app
7+
# Copy the current directory contents into the container at /code
8+
COPY ./app /code/app
9+
COPY requirements.txt /code/
610

7-
# Copy your application files
8-
COPY . /app
9-
10-
# Install Python and FastAPI dependencies
11+
# Install any needed packages specified in requirements.txt
1112
RUN pip install --no-cache-dir -r requirements.txt
1213

14+
ENV PYTHONPATH=/code
1315
EXPOSE 8000
1416

15-
CMD uvicorn main:app --port=${PORT:-8000} --host=0.0.0.0
17+
# Run the application
18+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
19+

0 commit comments

Comments
 (0)