Download Dockerfile from balaji958685/smartclass-ops: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/balaji958685/smartclass-ops/resolve/main/Dockerfile
- Command line
-
hf download hf://balaji958685/smartclass-ops/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/balaji958685/smartclass-ops/resolve/main/Dockerfile
1.46 kB
| # βββ SmartClass Edge Node ββββββββββββββββββββββββββββββββββββββββββββ | |
| FROM python:3.11-slim AS base | |
| LABEL maintainer="SmartClass Team" | |
| LABEL description="SmartClass Edge Node - Face Recognition Pipeline" | |
| # System dependencies for OpenCV, FAISS, and camera access | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| libgomp1 \ | |
| libgl1-mesa-glx \ | |
| libv4l-dev \ | |
| wget \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create non-root user | |
| RUN useradd -m -s /bin/bash smartclass | |
| WORKDIR /opt/smartclass | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy source code | |
| COPY src/ ./src/ | |
| COPY config/ ./config/ | |
| # Create data directories | |
| RUN mkdir -p /opt/smartclass/data/deploy \ | |
| /opt/smartclass/data/offline_queue \ | |
| /opt/smartclass/models \ | |
| && chown -R smartclass:smartclass /opt/smartclass | |
| # Set environment | |
| ENV PYTHONPATH=/opt/smartclass/src | |
| ENV PYTHONUNBUFFERED=1 | |
| # Switch to non-root user | |
| USER smartclass | |
| # Expose metrics port | |
| EXPOSE 9100 | |
| # Health check | |
| HEALTHCHECK --interval=15s --timeout=5s --retries=3 --start-period=45s \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:9100/metrics')" | |
| # Start edge pipeline | |
| CMD ["python", "-m", "edge_pipeline"] | |