Spaces:
Sleeping
Sleeping
Empereur-Pirate
commited on
Commit
•
2147b55
1
Parent(s):
95fc58d
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
-
FROM
|
5 |
|
6 |
WORKDIR /code
|
7 |
|
@@ -9,10 +9,11 @@ COPY ./requirements.txt /code/requirements.txt
|
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
-
COPY
|
13 |
-
|
14 |
COPY static /app/static
|
15 |
|
|
|
|
|
16 |
# Set up a new user named "user" with user ID 1000
|
17 |
RUN useradd -m -u 1000 user
|
18 |
|
@@ -21,7 +22,7 @@ USER user
|
|
21 |
|
22 |
# Set home to the user's home directory
|
23 |
ENV HOME=/home/user \
|
24 |
-
|
25 |
|
26 |
# Set the working directory to the user's home directory
|
27 |
WORKDIR $HOME/app
|
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
+
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9
|
5 |
|
6 |
WORKDIR /code
|
7 |
|
|
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
+
COPY ./app /app
|
|
|
13 |
COPY static /app/static
|
14 |
|
15 |
+
ENV UVICORN_HOST=0.0.0.0 ENV UVICORN_PORT=7860
|
16 |
+
|
17 |
# Set up a new user named "user" with user ID 1000
|
18 |
RUN useradd -m -u 1000 user
|
19 |
|
|
|
22 |
|
23 |
# Set home to the user's home directory
|
24 |
ENV HOME=/home/user \
|
25 |
+
PATH=/home/user/.local/bin:$PATH
|
26 |
|
27 |
# Set the working directory to the user's home directory
|
28 |
WORKDIR $HOME/app
|