ai-model / Dockerfile
midokhaled927's picture
Update Dockerfile
19495b5 verified
raw
history blame contribute delete
860 Bytes
FROM python:3.11-slim
WORKDIR /app
# تثبيت dependencies النظام
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
wget \
git \
&& rm -rf /var/lib/apt/lists/*
# نسخ ملف المتطلبات
COPY requirements.txt .
# تثبيت مكتبات Python مع تجاهل التحذيرات
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir gradio==5.4.0 uvicorn websockets
# نسخ باقي الملفات
COPY . .
# تحويل الموديل إلى TFLite عند بناء الصورة
RUN python convert_to_tflite.py || echo "⚠️ Skipping model conversion"
# فتح منفذ Gradio
EXPOSE 7860
# تشغيل التطبيق
CMD ["python", "app.py"]