Spaces:
Runtime error
Runtime error
Lambang
commited on
Commit
·
36d233d
1
Parent(s):
7f25d73
yuu
Browse files- Dockerfile +11 -4
Dockerfile
CHANGED
@@ -1,14 +1,21 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
# Menjalankan perintah untuk menginstal paket-paket yang dibutuhkan
|
4 |
-
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6
|
5 |
-
|
6 |
WORKDIR /code
|
7 |
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.9
|
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 |
+
RUN useradd -m -u 1000 user
|
10 |
+
|
11 |
+
USER user
|
12 |
+
|
13 |
+
# Menggunakan direktori home pengguna untuk menyimpan .deepface
|
14 |
+
ENV HOME=/home/user
|
15 |
+
|
16 |
+
# Mengatur direktori kerja menjadi /home/user/app
|
17 |
+
WORKDIR $HOME/app
|
18 |
+
|
19 |
+
COPY --chown=user . $HOME/app
|
20 |
|
21 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|