ZealPyae commited on
Commit
c4acb9a
·
verified ·
1 Parent(s): 4271345

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -22,6 +22,12 @@ FROM python:3.8-slim
22
  # Allow statements and log messages to immediately appear in the logs
23
  ENV PYTHONUNBUFFERED=True
24
 
 
 
 
 
 
 
25
  # Copy requirements.txt and install dependencies
26
  COPY requirements.txt .
27
  RUN pip install -r requirements.txt
@@ -33,3 +39,4 @@ WORKDIR /app
33
  # Run the FastAPI app with uvicorn
34
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
35
 
 
 
22
  # Allow statements and log messages to immediately appear in the logs
23
  ENV PYTHONUNBUFFERED=True
24
 
25
+ # Set the TRANSFORMERS_CACHE environment variable
26
+ ENV TRANSFORMERS_CACHE=/app/cache
27
+
28
+ # Create the cache directory
29
+ RUN mkdir -p /app/cache
30
+
31
  # Copy requirements.txt and install dependencies
32
  COPY requirements.txt .
33
  RUN pip install -r requirements.txt
 
39
  # Run the FastAPI app with uvicorn
40
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
41
 
42
+