Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +9 -21
Dockerfile
CHANGED
|
@@ -1,27 +1,15 @@
|
|
| 1 |
-
|
| 2 |
-
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
|
| 5 |
-
WORKDIR /code
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
| 10 |
-
|
| 11 |
-
RUN
|
| 12 |
|
| 13 |
-
|
| 14 |
-
ENV PATH="/code/venv/bin:$PATH"
|
| 15 |
|
| 16 |
-
|
| 17 |
-
COPY ./requirements.txt /code/requirements.txt
|
| 18 |
|
| 19 |
-
|
| 20 |
-
RUN pip install --no-cache-dir --upgrade pip && \
|
| 21 |
-
pip install --no-cache-dir -r /code/requirements.txt
|
| 22 |
-
|
| 23 |
-
# Copy the rest of the project files into the container
|
| 24 |
-
COPY . .
|
| 25 |
-
|
| 26 |
-
# Set the default command to run your application (inside the virtual environment)
|
| 27 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
FROM python:3.13-slim
|
|
|
|
| 2 |
|
| 3 |
+
WORKDIR /app
|
|
|
|
| 4 |
|
| 5 |
+
RUN python3 -m venv /app/venv
|
| 6 |
+
ENV PATH="/app/venv/bin:$PATH"
|
| 7 |
|
| 8 |
+
COPY requirements.txt /app/
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
+
COPY . /app
|
|
|
|
| 12 |
|
| 13 |
+
EXPOSE 8080
|
|
|
|
| 14 |
|
| 15 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|