| |
| |
| |
| |
| |
|
|
| FROM python:3.12-slim |
|
|
| WORKDIR /app |
|
|
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| build-essential \ |
| curl \ |
| git \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| |
| RUN pip3 install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cu121 |
|
|
| COPY requirements.txt ./ |
| RUN pip3 install --no-cache-dir -r requirements.txt |
|
|
| COPY . . |
|
|
| |
| ENV LORA_ADAPTER_PATH=Tyycha/qwen-coder-pauq-lora \ |
| BASE_MODEL_NAME=Qwen/Qwen2.5-Coder-3B-Instruct \ |
| DEVICE=cuda \ |
| API_HOST=127.0.0.1 \ |
| API_PORT=8000 \ |
| STREAMLIT_HOST=0.0.0.0 \ |
| STREAMLIT_PORT=7860 \ |
| RU2SQL_API_URL=http://127.0.0.1:8000 |
|
|
| EXPOSE 7860 |
|
|
| |
| |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=600s --retries=3 \ |
| CMD curl --fail http://localhost:7860/_stcore/health || exit 1 |
|
|
| ENTRYPOINT ["python", "scripts/run_app.py"] |
|
|