hafez1082 commited on
Commit
81dbfc5
·
verified ·
1 Parent(s): 25bab19

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -0
Dockerfile CHANGED
@@ -3,6 +3,9 @@ FROM python:3.12-slim
3
  # Install system dependencies
4
  RUN apt-get update && apt-get install -y git
5
 
 
 
 
6
  # Set working directory
7
  WORKDIR /code
8
 
@@ -15,6 +18,9 @@ RUN pip install --no-cache-dir -r requirements.txt
15
  # Copy the rest of the app
16
  COPY . .
17
 
 
 
 
18
  # Expose port 7860
19
  EXPOSE 7860
20
 
 
3
  # Install system dependencies
4
  RUN apt-get update && apt-get install -y git
5
 
6
+ # Set environment variable to avoid permission issues
7
+ ENV TRANSFORMERS_CACHE=/code/.cache
8
+
9
  # Set working directory
10
  WORKDIR /code
11
 
 
18
  # Copy the rest of the app
19
  COPY . .
20
 
21
+ # Create cache directory and give full permissions (just in case)
22
+ RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
23
+
24
  # Expose port 7860
25
  EXPOSE 7860
26