Spaces:
Paused
Paused
Dobin Yim
commited on
Commit
·
38d5748
1
Parent(s):
ffab2ce
Dockerfile reverted
Browse files- Dockerfile +4 -19
Dockerfile
CHANGED
@@ -1,27 +1,12 @@
|
|
1 |
FROM python:3.11
|
2 |
-
|
3 |
-
# Create a non-root user
|
4 |
RUN useradd -m -u 1000 user
|
5 |
-
|
6 |
-
# Set environment variables
|
7 |
ENV HOME=/home/user \
|
8 |
PATH=/home/user/.local/bin:$PATH
|
9 |
-
|
10 |
-
# Set the working directory
|
11 |
WORKDIR $HOME/app
|
12 |
-
|
13 |
# Copy requirements file and install dependencies
|
14 |
COPY --chown=user requirements.txt requirements.txt
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
-
|
17 |
-
|
18 |
-
COPY --chown=user . .
|
19 |
-
|
20 |
-
# Ensure the user has full permissions in the working directory
|
21 |
-
RUN chown -R user:user $HOME/app && chmod -R 755 $HOME/app
|
22 |
-
|
23 |
-
# Switch to the new user
|
24 |
-
USER user
|
25 |
-
|
26 |
-
# Command to run the application
|
27 |
-
CMD ["chainlit", "run", "final.py", "--port", "7860"]
|
|
|
1 |
FROM python:3.11
|
|
|
|
|
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 |
# Copy requirements file and install dependencies
|
9 |
COPY --chown=user requirements.txt requirements.txt
|
10 |
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
+
COPY . .
|
12 |
+
CMD ["chainlit", "run", "midterm.py", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|