Spaces:
Running on Zero
Running on Zero
| # GPU-ready Docker image for the Qwen2.5 Text-to-SQL LoRA Gradio app | |
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| curl \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face Docker Spaces run containers as UID 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| HF_HOME=/home/user/.cache/huggingface \ | |
| GRADIO_SERVER_NAME=0.0.0.0 \ | |
| GRADIO_SERVER_PORT=7860 \ | |
| PORT=7860 | |
| WORKDIR $HOME/app | |
| COPY --chown=user:user requirements.txt ./requirements.txt | |
| # match the successful local (CUDA-enabled) PyTorch training environment | |
| RUN python -m pip install --upgrade pip && \ | |
| python -m pip install torch==2.11.0 \ | |
| --index-url https://download.pytorch.org/whl/cu128 && \ | |
| python -m pip install -r requirements.txt | |
| COPY --chown=user:user . $HOME/app | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] |