Aadityaramrame commited on
Commit
4e3c10b
·
verified ·
1 Parent(s): e0d70f0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -7
Dockerfile CHANGED
@@ -1,17 +1,25 @@
1
- # Use an official lightweight Python image
2
  FROM python:3.10-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy project files
8
  COPY . /app
9
 
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r vru_backend/requirements.txt
 
 
 
 
 
12
 
13
- # Expose port
 
 
 
14
  EXPOSE 7860
15
 
16
- # Start FastAPI with Uvicorn
17
- CMD ["uvicorn", "vru_backend.app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use lightweight official Python image
2
  FROM python:3.10-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Copy all files to container
8
  COPY . /app
9
 
10
+ # Install system dependencies (important for OpenCV, Torch, etc.)
11
+ RUN apt-get update && apt-get install -y \
12
+ gcc \
13
+ ffmpeg \
14
+ libsm6 \
15
+ libxext6 \
16
+ && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Expose port for FastAPI
22
  EXPOSE 7860
23
 
24
+ # Run FastAPI app
25
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]