haroon103 commited on
Commit
2c26510
·
verified ·
1 Parent(s): 99ac7ab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -23
Dockerfile CHANGED
@@ -1,36 +1,16 @@
1
- FROM python:3.10-slim
2
 
3
- # Set working directory
4
  WORKDIR /app
5
 
6
- # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
  build-essential \
9
- curl \
10
- git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Copy requirements first for better caching
14
  COPY requirements.txt .
 
15
 
16
- # Install Python dependencies
17
- RUN pip install --no-cache-dir --upgrade pip && \
18
- pip install --no-cache-dir -r requirements.txt
19
-
20
- # Copy application code
21
  COPY app.py .
22
 
23
- # Create models directory
24
- RUN mkdir -p /app/models
25
-
26
- # Expose port 7860 (Hugging Face Spaces default)
27
  EXPOSE 7860
28
 
29
- # Set environment variables
30
- ENV PYTHONUNBUFFERED=1
31
- ENV TEXT_MODEL_PATH=/app/models/text_model.pth
32
- ENV IMAGE_MODEL_PATH=/app/models/image_model.pth
33
- ENV FUSION_MODEL_PATH=/app/models/fusion_model.pth
34
-
35
- # Run the application
36
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
 
 
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
 
 
 
 
 
 
12
  COPY app.py .
13
 
 
 
 
 
14
  EXPOSE 7860
15
 
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]