Download Dockerfile from Navya-Sree/AI-SQL-Query-Generator-on-Hugging-Face: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/spaces/Navya-Sree/AI-SQL-Query-Generator-on-Hugging-Face/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Navya-Sree/AI-SQL-Query-Generator-on-Hugging-Face/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Navya-Sree/AI-SQL-Query-Generator-on-Hugging-Face/resolve/main/Dockerfile
732 Bytes
| # Use Python 3.9 base image | |
| FROM python:3.9-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| software-properties-common \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy all files | |
| COPY . . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Download model during build | |
| RUN python -c "from transformers import AutoTokenizer, AutoModelForSeq2SeqLM; AutoTokenizer.from_pretrained('tscholak/cxmefzzi'); AutoModelForSeq2SeqLM.from_pretrained('tscholak/cxmefzzi')" | |
| # Expose port | |
| EXPOSE 7860 | |
| # Start Streamlit | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] |