Spaces:
Sleeping
Sleeping
Pedrampedram
commited on
Commit
•
f63c85e
1
Parent(s):
be7e9e8
Update Dockerfile
Browse files- Dockerfile +21 -9
Dockerfile
CHANGED
@@ -1,20 +1,32 @@
|
|
1 |
-
FROM python:3.9
|
2 |
|
3 |
# Create user and set environment variables
|
4 |
-
RUN useradd -m -u 1000 user
|
5 |
-
ENV HOME=/home/user \
|
6 |
-
PATH=/home/user/.local/bin:$PATH
|
7 |
|
8 |
# Switch to user and setup working directory
|
9 |
-
USER user
|
10 |
-
WORKDIR $HOME/app
|
11 |
|
12 |
# First, copy just the requirements.txt and install dependencies
|
13 |
-
COPY --chown=user ./requirements.txt $HOME/app/requirements.txt
|
14 |
-
RUN pip install --user -r requirements.txt
|
15 |
|
16 |
# Now copy the rest of the app
|
17 |
-
COPY --chown=user . $HOME/app
|
18 |
|
19 |
# Set the default command to run your application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
|
|
1 |
+
#FROM python:3.9
|
2 |
|
3 |
# Create user and set environment variables
|
4 |
+
#RUN useradd -m -u 1000 user
|
5 |
+
#ENV HOME=/home/user \
|
6 |
+
# PATH=/home/user/.local/bin:$PATH
|
7 |
|
8 |
# Switch to user and setup working directory
|
9 |
+
#USER user
|
10 |
+
#WORKDIR $HOME/app
|
11 |
|
12 |
# First, copy just the requirements.txt and install dependencies
|
13 |
+
#COPY --chown=user ./requirements.txt $HOME/app/requirements.txt
|
14 |
+
#RUN pip install --user -r requirements.txt
|
15 |
|
16 |
# Now copy the rest of the app
|
17 |
+
#COPY --chown=user . $HOME/app
|
18 |
|
19 |
# Set the default command to run your application
|
20 |
+
#CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
21 |
+
|
22 |
+
FROM python:3.9
|
23 |
+
RUN useradd -m -u 1000 user
|
24 |
+
USER user
|
25 |
+
ENV HOME=/home/user \
|
26 |
+
PATH=/home/user/.local/bin:$PATH
|
27 |
+
WORKDIR $HOME/app
|
28 |
+
COPY --chown=user . $HOME/app
|
29 |
+
COPY ./requirements.txt ~/app/requirements.txt
|
30 |
+
RUN pip install -r requirements.txt
|
31 |
+
COPY . .
|
32 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|