Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# استخدم صورة أساسية مناسبة
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# تثبيت المتطلبات
|
| 5 |
+
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu \
|
| 6 |
+
&& pip install onnxruntime huggingface_hub fastapi uvicorn
|
| 7 |
+
|
| 8 |
+
# إنشاء مجلد العمل
|
| 9 |
+
WORKDIR /app
|
| 10 |
+
|
| 11 |
+
# تنزيل النموذج من Hugging Face
|
| 12 |
+
RUN git clone https://huggingface.co/immich-app/antelopev2 /app/model
|
| 13 |
+
|
| 14 |
+
# نسخ كود التطبيق
|
| 15 |
+
COPY app.py /app/app.py
|
| 16 |
+
|
| 17 |
+
# تشغيل التطبيق
|
| 18 |
+
CMD ["python", "/app/app.py"]
|