Spaces:
Sleeping
Sleeping
bertugmirasyedi
commited on
Commit
·
21ae52a
1
Parent(s):
9ec3ae7
Update Dockerfile
Browse files- Dockerfile +2 -18
Dockerfile
CHANGED
@@ -2,24 +2,8 @@ FROM python:3.9
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
-
COPY
|
6 |
|
7 |
-
RUN pip install --no-cache-dir --upgrade -r
|
8 |
-
|
9 |
-
# Set up a new user named "user" with user ID 1000
|
10 |
-
RUN useradd -m -u 1000 user
|
11 |
-
|
12 |
-
# Switch to the "user" user
|
13 |
-
USER user
|
14 |
-
|
15 |
-
# Set home to the user's home directory
|
16 |
-
ENV HOME=/home/user \
|
17 |
-
PATH=/home/user/.local/bin:$PATH
|
18 |
-
|
19 |
-
# Set the working directory to the user's home directory
|
20 |
-
WORKDIR $HOME/app
|
21 |
-
|
22 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
23 |
-
COPY --chown=user . $HOME/app
|
24 |
|
25 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
+
COPY . /code
|
6 |
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|