Spaces:
Paused
Paused
Dobin Yim
commited on
Commit
·
ffab2ce
1
Parent(s):
799b600
changed ownership
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
@@ -3,9 +3,6 @@ FROM python:3.11
|
|
3 |
# Create a non-root user
|
4 |
RUN useradd -m -u 1000 user
|
5 |
|
6 |
-
# Switch to the new user
|
7 |
-
USER user
|
8 |
-
|
9 |
# Set environment variables
|
10 |
ENV HOME=/home/user \
|
11 |
PATH=/home/user/.local/bin:$PATH
|
@@ -20,5 +17,11 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
20 |
# Copy the rest of the application code
|
21 |
COPY --chown=user . .
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
# Command to run the application
|
24 |
-
CMD ["chainlit", "run", "final.py", "--port", "7860"]
|
|
|
3 |
# Create a non-root user
|
4 |
RUN useradd -m -u 1000 user
|
5 |
|
|
|
|
|
|
|
6 |
# Set environment variables
|
7 |
ENV HOME=/home/user \
|
8 |
PATH=/home/user/.local/bin:$PATH
|
|
|
17 |
# Copy the rest of the application code
|
18 |
COPY --chown=user . .
|
19 |
|
20 |
+
# Ensure the user has full permissions in the working directory
|
21 |
+
RUN chown -R user:user $HOME/app && chmod -R 755 $HOME/app
|
22 |
+
|
23 |
+
# Switch to the new user
|
24 |
+
USER user
|
25 |
+
|
26 |
# Command to run the application
|
27 |
+
CMD ["chainlit", "run", "final.py", "--port", "7860"]
|