Download Dockerfile from maikheb/nl2sql: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/maikheb/nl2sql/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/maikheb/nl2sql/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/maikheb/nl2sql/resolve/main/Dockerfile
1.01 kB
| # syntax=docker/dockerfile:1 | |
| FROM python:3.10-slim AS builder | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl build-essential sqlite3 libpq-dev default-libmysqlclient-dev gnupg \ | |
| gcc python3-dev libpq-dev \ | |
| && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages | |
| COPY --from=builder /usr/local/bin /usr/local/bin | |
| COPY . . | |
| ENV STREAMLIT_SERVER_HEADLESS=true \ | |
| STREAMLIT_SERVER_PORT=10000 \ | |
| STREAMLIT_SERVER_ADDRESS=0.0.0.0 \ | |
| STREAMLIT_BROWSER_GATHER_USAGE_STATS=false | |
| EXPOSE 10000 | |
| CMD ["sh", "-c", "streamlit run src/app.py --server.port=${PORT:-10000} --server.address=0.0.0.0"] | |