Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +13 -31
Dockerfile
CHANGED
@@ -1,42 +1,24 @@
|
|
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
|
9 |
-
# USER user
|
10 |
-
|
11 |
-
# # Set environment variables
|
12 |
-
# ENV HOME=/home/user \
|
13 |
-
# PATH=/home/user/.local/bin:$PATH
|
14 |
-
|
15 |
-
# # Set working directory
|
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"]
|
29 |
FROM python:3.11
|
|
|
|
|
30 |
RUN useradd -m -u 1000 user
|
31 |
USER user
|
|
|
|
|
32 |
ENV HOME=/home/user \
|
33 |
PATH=/home/user/.local/bin:$PATH
|
|
|
|
|
34 |
WORKDIR $HOME/app
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
COPY --chown=user . $HOME/app
|
36 |
-
COPY ./requirements.txt ~/app/requirements.txt
|
37 |
-
RUN pip install -r requirements.txt
|
38 |
-
COPY . .
|
39 |
|
|
|
40 |
EXPOSE 7860
|
41 |
|
42 |
# Command to run the application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.11
|
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 working directory
|
12 |
WORKDIR $HOME/app
|
13 |
+
|
14 |
+
# Copy requirements file and install dependencies
|
15 |
+
COPY --chown=user requirements.txt $HOME/app/requirements.txt
|
16 |
+
RUN pip install --user -r requirements.txt
|
17 |
+
|
18 |
+
# Copy application code
|
19 |
COPY --chown=user . $HOME/app
|
|
|
|
|
|
|
20 |
|
21 |
+
# Expose the port the app runs on
|
22 |
EXPOSE 7860
|
23 |
|
24 |
# Command to run the application
|