abhishekrs4
commited on
Commit
•
f260767
1
Parent(s):
c1de498
updated dockerfile by adding user and copying files explicitly to work directory
Browse files- 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 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|