Spaces:
Sleeping
Sleeping
Commit
·
161c3c9
1
Parent(s):
5c6d0b5
FIX: Added libglib2.0-0 (GThread) dependency for stable runtime
Browse files- Dockerfile +7 -9
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# ======================================================
|
| 2 |
-
# DOCKERFILE FINAL
|
| 3 |
# ======================================================
|
| 4 |
# Gunakan image Python yang stabil untuk AI/ML
|
| 5 |
FROM python:3.9-slim
|
|
@@ -7,28 +7,26 @@ FROM python:3.9-slim
|
|
| 7 |
# Set working directory di dalam container
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
-
# ---
|
| 11 |
-
#
|
| 12 |
-
# Ini adalah solusi standar untuk "cannot open shared object file" error.
|
| 13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 14 |
libgl1 \
|
| 15 |
libsm6 \
|
| 16 |
libxext6 \
|
| 17 |
libxrender1 \
|
|
|
|
| 18 |
&& apt-get clean \
|
| 19 |
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
# ------------------------------------------------------------
|
| 21 |
|
| 22 |
-
# Salin requirements.txt dan instal semua dependencies
|
| 23 |
COPY requirements.txt .
|
| 24 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
-
# Salin semua file proyek
|
| 27 |
-
# Termasuk model, kode, dan assets (termasuk folder OVR_Checkpoints)
|
| 28 |
COPY . /app
|
| 29 |
|
| 30 |
-
# Tentukan
|
| 31 |
-
# Token ini harus diatur di Hugging Face Space Secrets!
|
| 32 |
ENV HUGGINGFACE_TOKEN=
|
| 33 |
|
| 34 |
# Perintah untuk menjalankan server FastAPI Anda
|
|
|
|
| 1 |
# ======================================================
|
| 2 |
+
# DOCKERFILE FINAL UNTUK HUGGING FACE SPACES
|
| 3 |
# ======================================================
|
| 4 |
# Gunakan image Python yang stabil untuk AI/ML
|
| 5 |
FROM python:3.9-slim
|
|
|
|
| 7 |
# Set working directory di dalam container
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
+
# --- INSTALASI DEPENDENSI SISTEM LINUX (PENTING) ---
|
| 11 |
+
# Memperbaiki error libGL, libsm, dan libgthread-2.0.so.0
|
|
|
|
| 12 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 13 |
libgl1 \
|
| 14 |
libsm6 \
|
| 15 |
libxext6 \
|
| 16 |
libxrender1 \
|
| 17 |
+
libglib2.0-0 \
|
| 18 |
&& apt-get clean \
|
| 19 |
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
# ------------------------------------------------------------
|
| 21 |
|
| 22 |
+
# Salin requirements.txt dan instal semua dependencies Python
|
| 23 |
COPY requirements.txt .
|
| 24 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
+
# Salin semua file proyek (kode, model, folder OVR_Checkpoints)
|
|
|
|
| 27 |
COPY . /app
|
| 28 |
|
| 29 |
+
# Tentukan Environment Variable untuk otentikasi DINOv3
|
|
|
|
| 30 |
ENV HUGGINGFACE_TOKEN=
|
| 31 |
|
| 32 |
# Perintah untuk menjalankan server FastAPI Anda
|