Chittrarasu commited on
Commit
b93893f
·
1 Parent(s): 1274248
Files changed (1) hide show
  1. Dockerfile +7 -10
Dockerfile CHANGED
@@ -1,22 +1,19 @@
1
  # Use official Python base image
2
- FROM python:3.11-slim-bullseye
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy requirements file first (leverage Docker cache)
8
- COPY Requirements.txt .
9
-
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r Requirements.txt
12
-
13
- # Copy all application files
14
  COPY . /app
15
 
16
- # Set Transformers cache directory and permissions
17
- ENV TRANSFORMERS_CACHE=/app/.cache
18
  RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
19
 
 
 
 
20
  # Expose port (Hugging Face uses port 7860 by default)
21
  EXPOSE 7860
22
 
 
1
  # Use official Python base image
2
+ FROM python:3.11-slim
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Copy all files to the container
 
 
 
 
 
 
8
  COPY . /app
9
 
10
+ # Set HF_HOME to use an accessible cache directory
11
+ ENV HF_HOME=/app/.cache
12
  RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
13
 
14
+ # Install dependencies
15
+ RUN pip install --no-cache-dir -r Requirements.txt
16
+
17
  # Expose port (Hugging Face uses port 7860 by default)
18
  EXPOSE 7860
19