malavika-2016 commited on
Commit
30c12df
·
verified ·
1 Parent(s): 00b9fdc

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
23
+ CMD ["python", "app.py"]