Dharini Baskaran commited on
Commit
6896129
·
1 Parent(s): 47e55ae

updating reqs and docker

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -14
  2. requirements.txt +5 -4
Dockerfile CHANGED
@@ -1,11 +1,8 @@
1
  FROM python:3.9-slim
2
 
3
- # --- Install system dependencies ---
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  gcc \
7
- g++ \
8
- build-essential \
9
  libglib2.0-0 \
10
  libsm6 \
11
  libxext6 \
@@ -13,23 +10,14 @@ RUN apt-get update && apt-get install -y \
13
  ffmpeg \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # --- Set environment variables ---
17
  ENV MPLCONFIGDIR=/tmp/matplotlib
18
 
19
- # --- Install PyTorch (CPU version) ---
20
- RUN pip install torch==2.0.1+cpu torchvision==0.15.2+cpu torchaudio==2.0.2+cpu --index-url https://download.pytorch.org/whl/cpu
21
 
22
- # --- Install basic Python dependencies ---
23
- COPY requirements.txt .
24
  RUN pip install --upgrade pip
25
  RUN pip install -r requirements.txt
26
 
27
- # --- Install Detectron2 ---
28
- RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
29
-
30
- # --- Copy app code ---
31
  COPY . /app
32
- WORKDIR /app
33
 
34
- # --- Run the Gradio app ---
35
  CMD ["python3", "app.py"]
 
1
  FROM python:3.9-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  git \
5
  gcc \
 
 
6
  libglib2.0-0 \
7
  libsm6 \
8
  libxext6 \
 
10
  ffmpeg \
11
  && rm -rf /var/lib/apt/lists/*
12
 
 
13
  ENV MPLCONFIGDIR=/tmp/matplotlib
14
 
15
+ COPY requirements.txt /app/requirements.txt
16
+ WORKDIR /app
17
 
 
 
18
  RUN pip install --upgrade pip
19
  RUN pip install -r requirements.txt
20
 
 
 
 
 
21
  COPY . /app
 
22
 
 
23
  CMD ["python3", "app.py"]
requirements.txt CHANGED
@@ -1,4 +1,3 @@
1
- streamlit>=1.30
2
  opencv-python
3
  pycocotools
4
  Pillow
@@ -9,6 +8,8 @@ matplotlib
9
  labelme2coco
10
  numpy
11
  from_root
12
- gradio
13
- # torch==2.0.1
14
- # torchvision==0.15.2
 
 
 
 
1
  opencv-python
2
  pycocotools
3
  Pillow
 
8
  labelme2coco
9
  numpy
10
  from_root
11
+ gradio==3.50.2
12
+ torch==2.0.1+cpu
13
+ torchvision==0.15.2+cpu
14
+ torchaudio==2.0.2+cpu
15
+ git+https://github.com/facebookresearch/detectron2.git