Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
# Base image with Python
|
| 4 |
FROM python:3.10
|
| 5 |
|
|
@@ -12,13 +10,15 @@ COPY requirements.txt .
|
|
| 12 |
# Install dependencies
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
#
|
| 16 |
RUN mkdir -p /app/chroma_db
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
-
# Expose
|
| 21 |
-
EXPOSE
|
| 22 |
|
| 23 |
-
# Command to run
|
| 24 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "
|
|
|
|
|
|
|
|
|
|
| 1 |
# Base image with Python
|
| 2 |
FROM python:3.10
|
| 3 |
|
|
|
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Create and persist ChromaDB storage
|
| 14 |
RUN mkdir -p /app/chroma_db
|
| 15 |
+
VOLUME ["/app/chroma_db"]
|
| 16 |
+
|
| 17 |
+
# Copy application code
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
+
# Expose the correct port
|
| 21 |
+
EXPOSE 7860
|
| 22 |
|
| 23 |
+
# Command to run FastAPI
|
| 24 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|