praeclarumjj3 commited on
Commit
46faf7d
1 Parent(s): 5c23f00
Files changed (1) hide show
  1. Dockerfile +8 -14
Dockerfile CHANGED
@@ -10,16 +10,11 @@ RUN apt-get update && apt-get install -y \
10
  ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # RUN useradd -ms /bin/bash user
14
- # USER user
15
 
16
- USER root
17
-
18
- # ENV HOME=/home/user \
19
- # PATH=/home/user/.local/bin:$PATH
20
-
21
- ENV HOME=/home/root \
22
- PATH=/home/root/.local/bin:$PATH
23
 
24
  RUN curl https://pyenv.run | bash
25
  ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
@@ -30,8 +25,7 @@ RUN pyenv install 3.8.15 && \
30
 
31
  ENV WORKDIR=/code
32
  WORKDIR $WORKDIR
33
- # RUN chown -R user:user $WORKDIR
34
- RUN chown -R root:root $WORKDIR
35
  RUN chmod -R 755 $WORKDIR
36
 
37
 
@@ -46,15 +40,15 @@ ARG TORCH_CUDA_ARCH_LIST=7.5+PTX
46
 
47
  RUN pip install ninja
48
 
49
- USER root
50
  RUN ln -s $WORKDIR/oneformer/modeling/pixel_decoder/ops/ $WORKDIR/ && ls && cd ops/ && FORCE_CUDA=1 python setup.py build install --user && cd ..
51
 
52
  RUN sh deform_setup.sh
53
 
54
- USER root
55
  RUN sh deform_setup.sh
56
 
57
- USER root
58
 
59
  EXPOSE 7860
60
 
 
10
  ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ RUN useradd -ms /bin/bash user
14
+ USER user
15
 
16
+ ENV HOME=/home/user \
17
+ PATH=/home/user/.local/bin:$PATH
 
 
 
 
 
18
 
19
  RUN curl https://pyenv.run | bash
20
  ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
 
25
 
26
  ENV WORKDIR=/code
27
  WORKDIR $WORKDIR
28
+ RUN chown -R user:user $WORKDIR
 
29
  RUN chmod -R 755 $WORKDIR
30
 
31
 
 
40
 
41
  RUN pip install ninja
42
 
43
+ USER user
44
  RUN ln -s $WORKDIR/oneformer/modeling/pixel_decoder/ops/ $WORKDIR/ && ls && cd ops/ && FORCE_CUDA=1 python setup.py build install --user && cd ..
45
 
46
  RUN sh deform_setup.sh
47
 
48
+ USER user
49
  RUN sh deform_setup.sh
50
 
51
+ USER user
52
 
53
  EXPOSE 7860
54