Kaveh commited on
Commit
7dec0fe
·
unverified ·
1 Parent(s): 2a995cc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -5
Dockerfile CHANGED
@@ -3,9 +3,7 @@ FROM python:3.10-slim
3
  WORKDIR /app
4
 
5
  # Create cache directories with proper permissions
6
- RUN mkdir -p /app/cache /app/nltk_data && \
7
- chmod 777 /app/cache /app/nltk_data
8
-
9
  # Copy requirements and install dependencies
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
@@ -14,8 +12,8 @@ RUN pip install --no-cache-dir -r requirements.txt
14
  COPY . .
15
 
16
  # Set environment variables for cache directories
17
- ENV TRANSFORMERS_CACHE=/app/cache
18
- ENV HF_HOME=/app/cache
19
  ENV NLTK_DATA=/app/nltk_data
20
 
21
  EXPOSE 7860
 
3
  WORKDIR /app
4
 
5
  # Create cache directories with proper permissions
6
+ RUN mkdir -p /tmp/hf_cache /app/nltk_data && chmod 777 /tmp/hf_cache /app/nltk_data
 
 
7
  # Copy requirements and install dependencies
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
 
12
  COPY . .
13
 
14
  # Set environment variables for cache directories
15
+ ENV TRANSFORMERS_CACHE=/tmp/hf_cache
16
+ ENV HF_HOME=/tmp/hf_cache
17
  ENV NLTK_DATA=/app/nltk_data
18
 
19
  EXPOSE 7860