Spaces:
Runtime error
Runtime error
Sidharthan
commited on
Commit
•
e65401c
1
Parent(s):
9d2f477
Changed the Dockerfile for adding transfomrers cache
Browse files- Dockerfile +7 -1
Dockerfile
CHANGED
@@ -18,6 +18,12 @@ COPY requirements.txt .
|
|
18 |
RUN pip install --no-cache-dir --upgrade pip && \
|
19 |
pip install --no-cache-dir -r requirements.txt
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
# Copy the application code
|
22 |
COPY . .
|
23 |
|
@@ -25,4 +31,4 @@ COPY . .
|
|
25 |
EXPOSE 7860
|
26 |
|
27 |
# Command to run the application
|
28 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
18 |
RUN pip install --no-cache-dir --upgrade pip && \
|
19 |
pip install --no-cache-dir -r requirements.txt
|
20 |
|
21 |
+
# Set environment variable for Hugging Face cache
|
22 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
23 |
+
|
24 |
+
# Create the cache directory with proper permissions
|
25 |
+
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
26 |
+
|
27 |
# Copy the application code
|
28 |
COPY . .
|
29 |
|
|
|
31 |
EXPOSE 7860
|
32 |
|
33 |
# Command to run the application
|
34 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|