Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +20 -20
Dockerfile
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
-
FROM python:3.12.6
|
| 2 |
-
|
| 3 |
-
# Set working directory inside container
|
| 4 |
-
WORKDIR /code
|
| 5 |
-
|
| 6 |
-
# Copy requirements file (fixing the typo in the filename and path)
|
| 7 |
-
COPY ./
|
| 8 |
-
|
| 9 |
-
# Install dependencies
|
| 10 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirement.txt
|
| 11 |
-
|
| 12 |
-
# Add a non-root user and switch to it
|
| 13 |
-
RUN useradd -m user
|
| 14 |
-
USER user
|
| 15 |
-
|
| 16 |
-
# Copy the FastAPI app code
|
| 17 |
-
COPY . /code
|
| 18 |
-
|
| 19 |
-
# Command to run the app with uvicorn
|
| 20 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
| 1 |
+
FROM python:3.12.6
|
| 2 |
+
|
| 3 |
+
# Set working directory inside container
|
| 4 |
+
WORKDIR /code
|
| 5 |
+
|
| 6 |
+
# Copy requirements file (fixing the typo in the filename and path)
|
| 7 |
+
COPY ./requirment.txt /code/requirment.txt
|
| 8 |
+
|
| 9 |
+
# Install dependencies
|
| 10 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirement.txt
|
| 11 |
+
|
| 12 |
+
# Add a non-root user and switch to it
|
| 13 |
+
RUN useradd -m user
|
| 14 |
+
USER user
|
| 15 |
+
|
| 16 |
+
# Copy the FastAPI app code
|
| 17 |
+
COPY . /code
|
| 18 |
+
|
| 19 |
+
# Command to run the app with uvicorn
|
| 20 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|