haritsahm
commited on
Commit
·
f9c3dd0
1
Parent(s):
40c1653
Update python version
Browse files- Dockerfile +11 -6
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
FROM nvidia/cuda:11.7.1-runtime-
|
2 |
|
3 |
RUN apt update && \
|
4 |
apt install -y bash \
|
@@ -10,8 +10,13 @@ RUN apt update && \
|
|
10 |
python3-pip && \
|
11 |
rm -rf /var/lib/apt/lists
|
12 |
|
13 |
-
RUN
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
15 |
torch \
|
16 |
torchvision \
|
17 |
torchaudio
|
@@ -20,11 +25,11 @@ WORKDIR /code
|
|
20 |
|
21 |
COPY ./requirements.txt /code/requirements.txt
|
22 |
|
23 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
24 |
|
25 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install ffmpeg libsm6 libxext6 -y && rm -rf /var/lib/apt/lists
|
26 |
|
27 |
-
RUN pip install --no-cache-dir git+https://github.com/bowang-lab/MedSAM.git
|
28 |
|
29 |
# Set up a new user named "user" with user ID 1000
|
30 |
RUN useradd -m -u 1000 user
|
@@ -41,4 +46,4 @@ WORKDIR $HOME/app
|
|
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 ["streamlit", "run", "app.py"]
|
|
|
1 |
+
FROM nvidia/cuda:11.7.1-runtime-ubuntu22.04
|
2 |
|
3 |
RUN apt update && \
|
4 |
apt install -y bash \
|
|
|
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
|
|
|
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 |
# 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"]
|