Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
@@ -1,10 +1,16 @@
|
|
1 |
-
FROM python:3.9
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
COPY requirements.txt .
|
6 |
RUN pip install --no-cache-dir -r requirements.txt
|
7 |
|
8 |
COPY . .
|
9 |
|
10 |
-
CMD ["
|
|
|
1 |
+
FROM python:3.9
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Create a directory for the cache
|
6 |
+
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
7 |
+
|
8 |
+
# Set the TRANSFORMERS_CACHE environment variable
|
9 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
10 |
+
|
11 |
COPY requirements.txt .
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
COPY . .
|
15 |
|
16 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|