Bijoy09 commited on
Commit
d8c29e0
·
verified ·
1 Parent(s): 4e9fdd0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -9,14 +9,14 @@ COPY . /app
9
  # Install dependencies
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
- # Expose the port that the app will run on
13
- EXPOSE 7860
14
-
15
- # Set environment variable for Hugging Face cache directory
16
  ENV TRANSFORMERS_CACHE="/app/cache"
17
 
18
- # Create the cache directory
19
- RUN mkdir -p /app/cache
 
 
 
20
 
21
  # Command to run the FastAPI app with Uvicorn
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
9
  # Install dependencies
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ # Create and set the cache directory for Hugging Face
 
 
 
13
  ENV TRANSFORMERS_CACHE="/app/cache"
14
 
15
+ # Ensure the cache directory exists and has the correct permissions
16
+ RUN mkdir -p /app/cache && chmod -R 777 /app/cache
17
+
18
+ # Expose the port that the app will run on
19
+ EXPOSE 7860
20
 
21
  # Command to run the FastAPI app with Uvicorn
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]