Spaces:
Sleeping
Sleeping
Update DockerFile
Browse files- Dockerfile +13 -14
Dockerfile
CHANGED
|
@@ -1,20 +1,19 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
COPY
|
| 15 |
-
|
| 16 |
-
RUN mkdir -p /app/data
|
| 17 |
-
|
| 18 |
-
EXPOSE 7860
|
| 19 |
|
|
|
|
| 20 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
# Use Python 3.10
|
| 2 |
+
FROM python:3.10
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /code
|
| 6 |
|
| 7 |
+
# Copy requirements and install
|
| 8 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
|
| 10 |
|
| 11 |
+
# Create the data directory and set permissions (Crucial for writing feedback.jsonl)
|
| 12 |
+
RUN mkdir -p /code/data && chmod 777 /code/data
|
| 13 |
|
| 14 |
+
# Copy the application code
|
| 15 |
+
# FIX: We copy 'app.py' specifically, correcting your build error
|
| 16 |
+
COPY ./app.py /code/app.py
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
# Run the application
|
| 19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|