Spaces:
Sleeping
Sleeping
saicharan1234
commited on
Commit
•
db29447
1
Parent(s):
df43a34
Update Dockerfile
Browse files- Dockerfile +22 -21
Dockerfile
CHANGED
@@ -1,22 +1,23 @@
|
|
1 |
-
FROM python:3.10.12
|
2 |
-
|
3 |
-
WORKDIR /code
|
4 |
-
|
5 |
-
COPY ./requirements.txt /code/requirements.txt
|
6 |
-
|
7 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
22 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
FROM python:3.10.12
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
6 |
+
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
+
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
|
9 |
+
|
10 |
+
|
11 |
+
RUN useradd -m -u 1000 user
|
12 |
+
|
13 |
+
USER user
|
14 |
+
|
15 |
+
ENV HOME=/home/user \
|
16 |
+
PATH=/home/user/.local/bin:$PATH
|
17 |
+
|
18 |
+
WORKDIR $HOME/app
|
19 |
+
|
20 |
+
COPY --chown=user . $HOME/app
|
21 |
+
|
22 |
+
|
23 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|