MicroCore-Labs's picture
fix: try gradio 5.x to fix json_schema bool bug + localhost handling
31954ed
Raw
History Blame Contribute Delete
678 Bytes
FROM python:3.10-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
GRADIO_SERVER_NAME=0.0.0.0
WORKDIR /app
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
# Install CPU-only torch first (prevents 5GB GPU version download)
RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
# Install rest (modern compatible versions)
RUN pip install "diffusers>=0.30.0,<0.31" "transformers>=4.44.0,<4.45" "accelerate>=0.32.0,<0.33" "gradio>=5.0.0,<6" Pillow safetensors sentencepiece protobuf
COPY . /app
RUN useradd -m -u 1000 user && chown -R user /app
USER user
EXPOSE 7860
CMD ["python", "app.py"]