Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -11
Dockerfile
CHANGED
@@ -1,23 +1,20 @@
|
|
1 |
FROM python:3.10
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
RUN useradd -m -u 1000 user
|
4 |
USER user
|
5 |
ENV PATH="/home/user/.local/bin:$PATH"
|
6 |
|
7 |
WORKDIR /app
|
8 |
|
9 |
-
# Install library sistem yang dibutuhkan OpenCV
|
10 |
-
USER root
|
11 |
-
RUN apt-get update && apt-get install -y \
|
12 |
-
libgl1 \
|
13 |
-
libglib2.0-0 \
|
14 |
-
&& rm -rf /var/lib/apt/lists/*
|
15 |
-
USER user
|
16 |
-
|
17 |
COPY --chown=user ./requirements.txt requirements.txt
|
18 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
19 |
|
20 |
COPY --chown=user . /app
|
21 |
-
|
22 |
-
# Jalankan dengan uvicorn dan FastAPI wrapper
|
23 |
-
CMD ["uvicorn", "app:asgi_app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
# Install dependencies untuk kamera
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
libgl1 \
|
6 |
+
libglib2.0-0 \
|
7 |
+
v4l-utils \
|
8 |
+
&& rm -rf /var/lib/apt/lists/*
|
9 |
+
|
10 |
RUN useradd -m -u 1000 user
|
11 |
USER user
|
12 |
ENV PATH="/home/user/.local/bin:$PATH"
|
13 |
|
14 |
WORKDIR /app
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
COPY --chown=user ./requirements.txt requirements.txt
|
17 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
18 |
|
19 |
COPY --chown=user . /app
|
20 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|