agentsay commited on
Commit
3713aa1
·
verified ·
1 Parent(s): 9b7c64f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -9,20 +9,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
9
  libglib2.0-0 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Create Uploads, cache, and models directories with writable permissions
13
- RUN mkdir -p /app/Uploads /app/cache /app/models && chmod -R 777 /app/Uploads /app/cache /app/models
14
 
15
  # Set HF_HOME for huggingface_hub cache
16
  ENV HF_HOME=/app/cache
17
 
18
- # Copy all files and folders from the project root to /app
19
- COPY . .
 
 
 
 
20
 
 
21
  RUN pip install python-multipart
22
-
23
- # Install Python dependencies from requirements.txt
24
  RUN pip install --no-cache-dir -r requirements.txt
25
 
26
  # Expose the port for Hugging Face Spaces
27
  EXPOSE 7860
28
- CMD ["python", "app.py"]
 
9
  libglib2.0-0 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create directories with writable permissions
13
+ RUN mkdir -p /app/Uploads /app/cache /app/models /app/data && chmod -R 777 /app/Uploads /app/cache /app/models /app/data
14
 
15
  # Set HF_HOME for huggingface_hub cache
16
  ENV HF_HOME=/app/cache
17
 
18
+ # Copy specific directories and files
19
+ COPY data /app/data
20
+ COPY models /app/models
21
+ COPY requirements.txt /app/
22
+ COPY app.py /app/
23
+ COPY . . # Copy remaining files (if any)
24
 
25
+ # Install Python dependencies
26
  RUN pip install python-multipart
 
 
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
  # Expose the port for Hugging Face Spaces
30
  EXPOSE 7860
31
+ CMD ["python", "app.py"]