silaseic commited on
Commit
e9b0c04
1 Parent(s): 4f3db36

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -1,17 +1,16 @@
1
- FROM python:3.9
 
2
 
3
- # Install libgl1-mesa-glx
4
- RUN apt-get update && apt-get install -y libgl1-mesa-glx
5
 
 
6
  WORKDIR /code
7
-
8
  COPY ./requirements.txt /code/requirements.txt
9
-
10
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
 
12
  # Set up a new user named "user" with user ID 1000
13
  RUN useradd -m -u 1000 user
14
-
15
  # Add write permissions for others to the /usr/local/lib/python3.9/site-packages/oemer/checkpoints/seg_net/ directory
16
  RUN chmod o+w /usr/local/lib/python3.9/site-packages/oemer/checkpoints/seg_net/
17
  RUN chmod o+w /usr/local/lib/python3.9/site-packages/oemer/checkpoints/unet_big/
@@ -31,4 +30,4 @@ RUN chmod o+w /home/user/app
31
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
32
  COPY --chown=user . /home/user/app
33
 
34
- CMD ["python", "main.py"]
 
1
+ # Start with a base image that includes CUDA
2
+ FROM nvidia/cuda:11.4.1-base-ubuntu20.04
3
 
4
+ # Install Python and other dependencies
5
+ RUN apt-get update && apt-get install -y python3 python3-pip libgl1-mesa-glx
6
 
7
+ # Install the Python dependencies
8
  WORKDIR /code
 
9
  COPY ./requirements.txt /code/requirements.txt
10
+ RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
 
11
 
12
  # Set up a new user named "user" with user ID 1000
13
  RUN useradd -m -u 1000 user
 
14
  # Add write permissions for others to the /usr/local/lib/python3.9/site-packages/oemer/checkpoints/seg_net/ directory
15
  RUN chmod o+w /usr/local/lib/python3.9/site-packages/oemer/checkpoints/seg_net/
16
  RUN chmod o+w /usr/local/lib/python3.9/site-packages/oemer/checkpoints/unet_big/
 
30
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
31
  COPY --chown=user . /home/user/app
32
 
33
+ CMD ["python3", "main.py"]