harit-pc commited on
Commit
bdd19ae
·
1 Parent(s): 6ef1ed1

Update docker files

Browse files
Files changed (2) hide show
  1. .dockerignore +1 -0
  2. Dockerfile +14 -19
.dockerignore CHANGED
@@ -2,6 +2,7 @@
2
  !.streamlit/
3
  !figures/
4
  !utils/
 
5
  !app.py
6
  !index.html
7
  !style.css
 
2
  !.streamlit/
3
  !figures/
4
  !utils/
5
+ !checkpoint/
6
  !app.py
7
  !index.html
8
  !style.css
Dockerfile CHANGED
@@ -2,34 +2,29 @@ FROM nvidia/cuda:11.7.1-runtime-ubuntu22.04
2
 
3
  RUN apt update && apt upgrade -y && \
4
  apt install -y bash \
5
- build-essential \
6
- git \
7
- curl \
8
- ca-certificates \
9
- python3-dev \
10
- python3-pip && \
11
  rm -rf /var/lib/apt/lists
12
 
13
- RUN apt install software-properties-common && add-apt-repository ppa:deadsnakes/ppa && \
14
- apt update && apt install python3.9 && \
15
- rm -rf /var/lib/apt/lists
16
- RUN rm -f /usr/bin/python && ln -s /usr/bin/python /usr/bin/python3.9
17
-
18
- RUN python3.9 -m pip install --no-cache-dir --upgrade pip && \
19
- python33.9 -m pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu113 \
20
  torch \
21
  torchvision \
22
  torchaudio
23
 
24
- WORKDIR /code
25
 
26
- COPY ./requirements.txt /code/requirements.txt
27
 
28
- RUN python3.9 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
29
 
30
- RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install ffmpeg libsm6 libxext6 -y && rm -rf /var/lib/apt/lists
31
 
32
- RUN python3.9 -m pip install --no-cache-dir git+https://github.com/bowang-lab/MedSAM.git
33
 
34
  # Set up a new user named "user" with user ID 1000
35
  RUN useradd -m -u 1000 user
@@ -46,4 +41,4 @@ WORKDIR $HOME/app
46
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
47
  COPY --chown=user . $HOME/app
48
 
49
- CMD ["python3.9", "-m", "streamlit", "run", "app.py"]
 
2
 
3
  RUN apt update && apt upgrade -y && \
4
  apt install -y bash \
5
+ build-essential \
6
+ git \
7
+ curl \
8
+ ca-certificates \
9
+ python3-dev \
10
+ python3-pip && \
11
  rm -rf /var/lib/apt/lists
12
 
13
+ RUN python3.10 -m pip install --no-cache-dir --upgrade pip && \
14
+ python3.10 -m pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu117 \
 
 
 
 
 
15
  torch \
16
  torchvision \
17
  torchaudio
18
 
19
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install ffmpeg libsm6 libxext6 -y && rm -rf /var/lib/apt/lists
20
 
21
+ RUN python3.10 -m pip install --no-cache-dir git+https://github.com/facebookresearch/segment-anything.git
22
 
23
+ WORKDIR /code
24
 
25
+ COPY ./requirements.txt /code/requirements.txt
26
 
27
+ RUN python3.10 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
28
 
29
  # Set up a new user named "user" with user ID 1000
30
  RUN useradd -m -u 1000 user
 
41
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
42
  COPY --chown=user . $HOME/app
43
 
44
+ CMD ["python3.10", "-m", "streamlit", "run", "app.py"]