Spaces:
Runtime error
Runtime error
Commit
·
68cf355
1
Parent(s):
6463c0f
update Docker
Browse files- Dockerfile +16 -3
Dockerfile
CHANGED
|
@@ -1,11 +1,24 @@
|
|
| 1 |
FROM python:3.9
|
|
|
|
|
|
|
| 2 |
RUN useradd -m -u 1000 user
|
| 3 |
USER user
|
|
|
|
|
|
|
| 4 |
ENV HOME=/home/user \
|
| 5 |
PATH=/home/user/.local/bin:$PATH
|
|
|
|
|
|
|
| 6 |
WORKDIR $HOME/app
|
|
|
|
|
|
|
| 7 |
COPY --chown=user . $HOME/app
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
COPY . .
|
|
|
|
|
|
|
|
|
|
| 11 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
+
|
| 3 |
+
# Create a non-root user
|
| 4 |
RUN useradd -m -u 1000 user
|
| 5 |
USER user
|
| 6 |
+
|
| 7 |
+
# Set environment variables
|
| 8 |
ENV HOME=/home/user \
|
| 9 |
PATH=/home/user/.local/bin:$PATH
|
| 10 |
+
|
| 11 |
+
# Set the working directory
|
| 12 |
WORKDIR $HOME/app
|
| 13 |
+
|
| 14 |
+
# Copy the application files
|
| 15 |
COPY --chown=user . $HOME/app
|
| 16 |
+
|
| 17 |
+
# Copy the requirements file and install dependencies
|
| 18 |
+
COPY requirements.txt $HOME/app/requirements.txt
|
| 19 |
+
RUN pip install --user -r requirements.txt
|
| 20 |
+
|
| 21 |
+
# Expose the port and set the command to run the application
|
| 22 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
| 23 |
+
|
| 24 |
+
|