Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
@@ -4,8 +4,7 @@ FROM python:3.10.9
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
|
8 |
-
COPY . /app
|
9 |
|
10 |
# Install any needed packages specified in requirements.txt
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
@@ -24,5 +23,8 @@ RUN mkdir -p /app/data && \
|
|
24 |
# Switch to the non-root user
|
25 |
USER appuser
|
26 |
|
|
|
|
|
|
|
27 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
28 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
COPY requirements.txt /app
|
|
|
8 |
|
9 |
# Install any needed packages specified in requirements.txt
|
10 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
23 |
# Switch to the non-root user
|
24 |
USER appuser
|
25 |
|
26 |
+
# Copy the current directory contents into the container at /app
|
27 |
+
COPY . /app
|
28 |
+
|
29 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
30 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|