sandbox338 commited on
Commit
8918892
·
verified ·
1 Parent(s): d211dc2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -19
Dockerfile CHANGED
@@ -1,9 +1,7 @@
1
  FROM python:3.9-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 \
@@ -11,31 +9,25 @@ RUN apt-get update && apt-get install -y \
11
  git \
12
  libgl1-mesa-glx \
13
  libglib2.0-0 \
 
 
 
 
 
 
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Copy the requirements file and install dependencies
17
  COPY requirements.txt ./
18
  COPY src/ ./src/
19
 
20
- # Install the Python dependencies
21
- RUN pip3 install -r requirements.txt
 
 
22
 
23
- RUN pip3 install numpy
24
-
25
-
26
- # Install torchvision
27
- RUN pip3 install torchvision==0.15.2
28
-
29
-
30
-
31
- # Install detectron2 manually
32
- RUN pip3 install 'git+https://github.com/facebookresearch/detectron2.git'
33
-
34
- # Expose the Streamlit port
35
  EXPOSE 8501
36
 
37
- # Healthcheck to verify if Streamlit is up and running
38
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
39
 
40
- # Run the Streamlit app
41
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
 
9
  git \
10
  libgl1-mesa-glx \
11
  libglib2.0-0 \
12
+ libffi-dev \
13
+ libssl-dev \
14
+ libbz2-dev \
15
+ liblzma-dev \
16
+ libreadline-dev \
17
+ libsqlite3-dev \
18
+ zlib1g-dev \
19
  && rm -rf /var/lib/apt/lists/*
20
 
 
21
  COPY requirements.txt ./
22
  COPY src/ ./src/
23
 
24
+ RUN pip install numpy && \
25
+ pip install -r requirements.txt && \
26
+ pip install torchvision==0.15.2 && \
27
+ pip install 'git+https://github.com/facebookresearch/detectron2.git'
28
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  EXPOSE 8501
30
 
 
31
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
32
 
 
33
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]