Download Dockerfile from saskarkhadka/classification-backend: direct link, hf CLI and curl.
- Browser
- Download file 759 Bytes
-
https://huggingface.co/spaces/saskarkhadka/classification-backend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/saskarkhadka/classification-backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/saskarkhadka/classification-backend/resolve/main/Dockerfile
759 Bytes
| FROM python:3.11-slim AS builder | |
| WORKDIR /usr/src/app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip3 install --upgrade pip && \ | |
| pip3 install --no-cache-dir -r requirements.txt && \ | |
| opentelemetry-bootstrap -a install | |
| RUN mkdir -p /outputs/bert \ | |
| /outputs/ml \ | |
| /outputs/mlp \ | |
| /outputs/lstm \ | |
| /outputs/transformer | |
| COPY outputs/bert/label_encoder.pkl ./outputs/bert/ | |
| COPY outputs/lstm ./outputs/lstm | |
| COPY outputs/ml ./outputs/ml | |
| COPY outputs/mlp ./outputs/mlp | |
| COPY app ./app | |
| COPY start.sh . | |
| RUN useradd -m appuser && \ | |
| chown -R appuser:appuser /usr/src/app && \ | |
| chmod +x start.sh | |
| USER appuser | |
| CMD ["./start.sh"] |