Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -6
Dockerfile
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
-
FROM python:3.
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# Create a non-root user
|
4 |
RUN useradd -m -u 1000 user
|
@@ -12,14 +16,13 @@ ENV HOME=/home/user \
|
|
12 |
WORKDIR $HOME/app
|
13 |
|
14 |
# Copy requirements file and install dependencies
|
15 |
-
COPY --chown=user
|
|
|
|
|
16 |
RUN pip install --user -r requirements.txt
|
17 |
|
18 |
# Copy application code
|
19 |
-
COPY
|
20 |
-
|
21 |
-
# Expose the port the app runs on
|
22 |
-
EXPOSE 7860
|
23 |
|
24 |
# Command to run the application
|
25 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
# Install system dependencies
|
4 |
+
RUN apt-get update && \
|
5 |
+
apt-get install -y build-essential gfortran
|
6 |
|
7 |
# Create a non-root user
|
8 |
RUN useradd -m -u 1000 user
|
|
|
16 |
WORKDIR $HOME/app
|
17 |
|
18 |
# Copy requirements file and install dependencies
|
19 |
+
COPY --chown=user . $HOME/app
|
20 |
+
COPY ./requirements.txt $HOME/app/requirements.txt
|
21 |
+
|
22 |
RUN pip install --user -r requirements.txt
|
23 |
|
24 |
# Copy application code
|
25 |
+
COPY . .
|
|
|
|
|
|
|
26 |
|
27 |
# Command to run the application
|
28 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|