abhishekrs4 commited on
Commit
f260767
1 Parent(s): c1de498

updated dockerfile by adding user and copying files explicitly to work directory

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -10
Dockerfile CHANGED
@@ -14,16 +14,27 @@ COPY ./requirements.txt .
14
 
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- COPY ./training/__init__.py ./training/
18
- COPY ./training/dataset.py ./training/
19
- COPY ./training/encoder_models.py ./training/
20
- COPY ./training/decoder_models.py ./training/
21
- COPY ./training/image_preprocessing.py ./training/
22
- COPY ./training/logger_utils.py ./training/
23
- COPY ./training/metrics.py ./training/
24
- COPY ./training/seg_models.py ./training/
25
- COPY ./training/image_stats.json ./training/
26
- COPY ./app.py .
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  EXPOSE 8501
29
 
 
14
 
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # User
18
+ RUN useradd -m -u 1000 user
19
+ USER user
20
+ ENV HOME /home/user
21
+ ENV PATH $HOME/.local/bin:$PATH
22
+
23
+ WORKDIR $HOME
24
+ RUN mkdir app
25
+ WORKDIR $HOME/app
26
+
27
+
28
+ COPY ./training/__init__.py $HOME/app/training/
29
+ COPY ./training/dataset.py $HOME/app/training/
30
+ COPY ./training/encoder_models.py $HOME/app/training/
31
+ COPY ./training/decoder_models.py $HOME/app/training/
32
+ COPY ./training/image_preprocessing.py $HOME/app/training/
33
+ COPY ./training/logger_utils.py $HOME/app/training/
34
+ COPY ./training/metrics.py $HOME/app/training/
35
+ COPY ./training/seg_models.py $HOME/app/training/
36
+ COPY ./training/image_stats.json $HOME/app/training/
37
+ COPY ./app.py $HOME/app
38
 
39
  EXPOSE 8501
40