yuanze1024 commited on
Commit
5b2797c
·
1 Parent(s): f43bdbf

fix ownership in dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -3,18 +3,18 @@ FROM nvcr.io/nvidia/pytorch:23.08-py3
3
  LABEL maintainer="yuanze"
4
  LABEL email="[email protected]"
5
 
 
 
 
6
  RUN useradd -m -u 1000 user
7
  USER user
8
 
9
  WORKDIR /code
10
 
11
- # Install webp support
12
- RUN apt update && apt install libwebp-dev -y
13
-
14
  # According to https://huggingface.co/docs/hub/spaces-sdks-docker#permissions, the container will run with the user id 1000
15
  RUN chown -R user:user /code
16
 
17
- COPY ./requirements.txt /code/requirements.txt
18
 
19
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
20
 
@@ -25,7 +25,7 @@ ENV TORCH_CUDA_ARCH_LIST="8.6"
25
  RUN git clone https://github.com/erikwijmans/Pointnet2_PyTorch.git
26
 
27
  # replace the setup.py file to fix the error
28
- COPY ./change_setup.txt /code/Pointnet2_PyTorch/pointnet2_ops_lib/setup.py
29
 
30
  RUN cd Pointnet2_PyTorch/pointnet2_ops_lib \
31
  && pip install .
 
3
  LABEL maintainer="yuanze"
4
  LABEL email="[email protected]"
5
 
6
+ # Install webp support
7
+ RUN apt update && apt install libwebp-dev -y
8
+
9
  RUN useradd -m -u 1000 user
10
  USER user
11
 
12
  WORKDIR /code
13
 
 
 
 
14
  # According to https://huggingface.co/docs/hub/spaces-sdks-docker#permissions, the container will run with the user id 1000
15
  RUN chown -R user:user /code
16
 
17
+ COPY --chown=user:user ./requirements.txt /code/requirements.txt
18
 
19
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
20
 
 
25
  RUN git clone https://github.com/erikwijmans/Pointnet2_PyTorch.git
26
 
27
  # replace the setup.py file to fix the error
28
+ COPY --chown=user:user ./change_setup.txt /code/Pointnet2_PyTorch/pointnet2_ops_lib/setup.py
29
 
30
  RUN cd Pointnet2_PyTorch/pointnet2_ops_lib \
31
  && pip install .