Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
@@ -1,17 +1,16 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
# Install
|
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 ["
|
|
|
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"]
|