Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +2 -9
Dockerfile
CHANGED
@@ -1,24 +1,17 @@
|
|
1 |
FROM python:3.12.8-slim
|
2 |
|
3 |
-
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
-
# Copy requirements and install dependencies
|
7 |
COPY requirements.txt .
|
8 |
RUN pip install --no-cache-dir -r requirements.txt
|
9 |
|
10 |
-
#
|
11 |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
12 |
ENV TRANSFORMERS_CACHE=/app/cache
|
13 |
|
14 |
-
#
|
15 |
-
RUN mkdir -p chroma_langchain_db data upload
|
16 |
-
|
17 |
-
# Copy the rest of the application code
|
18 |
COPY . .
|
19 |
|
20 |
-
# Expose the port (used by Spaces or locally)
|
21 |
EXPOSE 7860
|
22 |
|
23 |
-
# Start the FastAPI app
|
24 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.12.8-slim
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
COPY requirements.txt .
|
6 |
RUN pip install --no-cache-dir -r requirements.txt
|
7 |
|
8 |
+
# Setup Hugging Face cache directory
|
9 |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
10 |
ENV TRANSFORMERS_CACHE=/app/cache
|
11 |
|
12 |
+
# Copy all app files
|
|
|
|
|
|
|
13 |
COPY . .
|
14 |
|
|
|
15 |
EXPOSE 7860
|
16 |
|
|
|
17 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|