Spaces:
Runtime error
Runtime error
Commit
·
669c97b
1
Parent(s):
047f1f8
First commit
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
@@ -1,9 +1,17 @@
|
|
1 |
FROM python:3.10
|
2 |
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /app
|
|
|
4 |
COPY requirements.txt .
|
5 |
RUN pip install --no-cache-dir -r requirements.txt
|
6 |
|
|
|
|
|
|
|
7 |
COPY . .
|
8 |
|
9 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
# Set environment variables for Hugging Face cache
|
4 |
+
ENV HF_HOME=/app/huggingface
|
5 |
+
ENV TRANSFORMERS_CACHE=/app/huggingface
|
6 |
+
|
7 |
WORKDIR /app
|
8 |
+
|
9 |
COPY requirements.txt .
|
10 |
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
|
12 |
+
# Ensure cache directory exists and is writable
|
13 |
+
RUN mkdir -p /app/huggingface && chmod -R 777 /app/huggingface
|
14 |
+
|
15 |
COPY . .
|
16 |
|
17 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|