Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +10 -8
Dockerfile
CHANGED
@@ -1,18 +1,20 @@
|
|
1 |
-
|
2 |
-
FROM python:3.12
|
3 |
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy
|
8 |
-
COPY
|
|
|
|
|
9 |
RUN pip install -r requirements.txt
|
10 |
|
11 |
-
#
|
12 |
-
|
|
|
13 |
|
14 |
-
# Expose the port
|
15 |
EXPOSE 8000
|
16 |
|
17 |
-
# Run the
|
18 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
1 |
+
FROM python:3.12-slim
|
|
|
2 |
|
3 |
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
+
# Copy your application code
|
7 |
+
COPY . .
|
8 |
+
|
9 |
+
# Install dependencies
|
10 |
RUN pip install -r requirements.txt
|
11 |
|
12 |
+
# Create and set the cache directory for Hugging Face
|
13 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
14 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
15 |
|
16 |
+
# Expose the port
|
17 |
EXPOSE 8000
|
18 |
|
19 |
+
# Run the application
|
20 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|