Spaces:
Build error
Build error
Commit ·
8fba1d0
1
Parent(s): 117561f
first commit
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
FROM python:3.11
|
| 2 |
|
|
|
|
| 3 |
RUN useradd -m -u 1000 user
|
|
|
|
|
|
|
| 4 |
USER user
|
| 5 |
ENV HOME=/home/user \
|
| 6 |
PATH=/home/user/.local/bin:$PATH
|
| 7 |
|
|
|
|
| 8 |
WORKDIR $HOME/app
|
| 9 |
|
| 10 |
# Copy the requirements.txt file to the container
|
|
@@ -13,7 +17,8 @@ COPY requirements.txt $HOME/app/
|
|
| 13 |
# Install Python dependencies from requirements.txt
|
| 14 |
RUN pip install -r $HOME/app/requirements.txt
|
| 15 |
|
| 16 |
-
# Copy the
|
| 17 |
-
COPY
|
| 18 |
|
|
|
|
| 19 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.11
|
| 2 |
|
| 3 |
+
# Create a non-root user
|
| 4 |
RUN useradd -m -u 1000 user
|
| 5 |
+
|
| 6 |
+
# Set user and environment variables
|
| 7 |
USER user
|
| 8 |
ENV HOME=/home/user \
|
| 9 |
PATH=/home/user/.local/bin:$PATH
|
| 10 |
|
| 11 |
+
# Set the working directory in the container
|
| 12 |
WORKDIR $HOME/app
|
| 13 |
|
| 14 |
# Copy the requirements.txt file to the container
|
|
|
|
| 17 |
# Install Python dependencies from requirements.txt
|
| 18 |
RUN pip install -r $HOME/app/requirements.txt
|
| 19 |
|
| 20 |
+
# Copy the application files, including app.py
|
| 21 |
+
COPY . $HOME/app/
|
| 22 |
|
| 23 |
+
# Specify the command to run your application
|
| 24 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|