seanpedrickcase
commited on
Commit
•
3b77fe5
1
Parent(s):
f20dd46
Testing not running Dockerfile as user for Lambda compatibility
Browse files- Dockerfile +9 -6
Dockerfile
CHANGED
@@ -30,14 +30,17 @@ RUN rm -rf /model/bge/.git
|
|
30 |
EXPOSE 8080
|
31 |
|
32 |
# Set up a new user named "user" with user ID 1000
|
33 |
-
RUN useradd -m -u 1000 user
|
34 |
|
35 |
# Change ownership of /home/user directory
|
36 |
-
RUN chown -R user:user /home/user
|
37 |
|
38 |
# Make output folder
|
39 |
-
RUN mkdir -p /home/user/app/output && chown -R user:user /home/user/app/output
|
40 |
-
RUN mkdir -p /home/user/.cache/huggingface/hub && chown -R user:user /home/user/.cache/huggingface/hub
|
|
|
|
|
|
|
41 |
|
42 |
# Switch to the "user" user
|
43 |
USER user
|
@@ -60,8 +63,8 @@ ENV HOME=/home/user \
|
|
60 |
WORKDIR $HOME/app
|
61 |
|
62 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
63 |
-
COPY --chown=user . $HOME/app
|
64 |
-
|
65 |
|
66 |
|
67 |
CMD ["python", "app.py"]
|
|
|
30 |
EXPOSE 8080
|
31 |
|
32 |
# Set up a new user named "user" with user ID 1000
|
33 |
+
#RUN useradd -m -u 1000 user
|
34 |
|
35 |
# Change ownership of /home/user directory
|
36 |
+
#RUN chown -R user:user /home/user
|
37 |
|
38 |
# Make output folder
|
39 |
+
#RUN mkdir -p /home/user/app/output && chown -R user:user /home/user/app/output
|
40 |
+
#RUN mkdir -p /home/user/.cache/huggingface/hub && chown -R user:user /home/user/.cache/huggingface/hub
|
41 |
+
|
42 |
+
RUN mkdir -p /home/user/app/output
|
43 |
+
RUN mkdir -p /home/user/.cache/huggingface/hub
|
44 |
|
45 |
# Switch to the "user" user
|
46 |
USER user
|
|
|
63 |
WORKDIR $HOME/app
|
64 |
|
65 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
66 |
+
#COPY --chown=user . $HOME/app
|
67 |
+
COPY . $HOME/app
|
68 |
|
69 |
|
70 |
CMD ["python", "app.py"]
|