Noursine commited on
Commit
6435dc0
·
verified ·
1 Parent(s): 8cfc605

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -12
Dockerfile CHANGED
@@ -3,7 +3,6 @@ FROM python:3.10-slim
3
  WORKDIR /app
4
  COPY . .
5
 
6
- # Install system packages
7
  RUN apt-get update && apt-get install -y \
8
  git \
9
  ffmpeg \
@@ -15,20 +14,10 @@ RUN apt-get update && apt-get install -y \
15
  python3-dev \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # Upgrade pip
19
  RUN pip install --upgrade pip
20
-
21
- # Install PyTorch (CPU version)
22
  RUN pip install torch==2.0.1+cpu torchvision==0.15.2+cpu --index-url https://download.pytorch.org/whl/cpu
23
-
24
- # Install Python dependencies
25
  RUN pip install -r requirements.txt
26
-
27
- # Install Detectron2 from prebuilt CPU wheel (faster than GitHub build)
28
- RUN pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch2.0/index.html
29
-
30
- # Expose Hugging Face default port
31
  EXPOSE 7860
32
 
33
- # Start the app
34
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  WORKDIR /app
4
  COPY . .
5
 
 
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  ffmpeg \
 
14
  python3-dev \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
17
  RUN pip install --upgrade pip
 
 
18
  RUN pip install torch==2.0.1+cpu torchvision==0.15.2+cpu --index-url https://download.pytorch.org/whl/cpu
 
 
19
  RUN pip install -r requirements.txt
20
+ RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
 
 
 
 
21
  EXPOSE 7860
22
 
 
23
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]