malavika-2016 commited on
Commit
f264b7d
·
verified ·
1 Parent(s): 50e7ed6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -12
Dockerfile CHANGED
@@ -1,22 +1,17 @@
1
- FROM python:3.9-slim
2
-
3
- # Install basic dependencies
4
- RUN apt-get update && apt-get install -y git ffmpeg && rm -rf /var/lib/apt/lists/*
5
 
6
  # Set working directory
7
  WORKDIR /app
8
 
9
- # Copy app and requirements
10
- COPY app.py /app
11
- COPY requirements.txt /app
12
-
13
- # Install Python dependencies
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Download model weights (cached in HF)
17
- RUN python -c "from transformers import BlipProcessor, BlipForConditionalGeneration; BlipProcessor.from_pretrained('Salesforce/blip-image-captioning-base'); BlipForConditionalGeneration.from_pretrained('Salesforce/blip-image-captioning-base')"
18
 
19
- # Expose port
20
  EXPOSE 7860
21
 
22
  # Run the app
 
1
+ # Base image
2
+ FROM python:3.10-slim
 
 
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install dependencies
8
+ COPY requirements.txt .
 
 
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy app code
12
+ COPY app.py .
13
 
14
+ # Expose the port
15
  EXPOSE 7860
16
 
17
  # Run the app