Download Dockerfile from ABIcode23/SQLCHAT: direct link, hf CLI and curl.
- Browser
- Download file 807 Bytes
-
https://huggingface.co/spaces/ABIcode23/SQLCHAT/resolve/13002e8aeb465d379ea71264ed47deedc974fdaa/Dockerfile
- Command line
-
hf download hf://spaces/ABIcode23/SQLCHAT@13002e8aeb465d379ea71264ed47deedc974fdaa/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ABIcode23/SQLCHAT/resolve/13002e8aeb465d379ea71264ed47deedc974fdaa/Dockerfile
807 Bytes
| FROM python:3.10-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /code | |
| # Copy requirements file | |
| COPY ./requirements.txt /code/requirements.txt | |
| # Upgrade pip and install requirements | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r /code/requirements.txt | |
| # Create and use non-root user | |
| RUN useradd -m user | |
| USER user | |
| # Set environment variables | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR $HOME/app | |
| # Copy application code | |
| COPY --chown=user . $HOME/app | |
| # Run the application | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |