danieaneta commited on
Commit
2c220ca
·
1 Parent(s): db50748

update dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -3,12 +3,12 @@ WORKDIR /app
3
 
4
  # Set environment variables for caches
5
  ENV MPLCONFIGDIR=/app/matplotlib_cache
6
- ENV TRANSFORMERS_CACHE=/app/transformers_cache
7
  ENV HOME=/app
8
 
9
- # Create directories
10
- RUN mkdir -p /app/matplotlib_cache
11
- RUN mkdir -p /app/transformers_cache
12
 
13
  # Install dependencies
14
  COPY requirements.txt .
@@ -20,3 +20,4 @@ COPY . .
20
  # Command to run your application
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"]
22
 
 
 
3
 
4
  # Set environment variables for caches
5
  ENV MPLCONFIGDIR=/app/matplotlib_cache
6
+ ENV HF_HOME=/app/transformers_cache
7
  ENV HOME=/app
8
 
9
+ # Create and set permissions for directories
10
+ RUN mkdir -p /app/matplotlib_cache /app/transformers_cache && \
11
+ chmod -R 777 /app/matplotlib_cache /app/transformers_cache
12
 
13
  # Install dependencies
14
  COPY requirements.txt .
 
20
  # Command to run your application
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"]
22
 
23
+