Quantarion-Docker-AI / PRODUCTION-DOCKERFILE
Aqarion's picture
Create PRODUCTION-DOCKERFILE
7099e55 verified
# QUANTARION-DOCKER-AI: BORION φ⁴³ Hyperspectral Compression
# HF Spaces Production Deployment - 78% L3 Live
FROM python:3.11-slim
LABEL maintainer="AQARION / BORION TEAM"
LABEL version="1.0.0"
LABEL description="BORION φ⁴³ L3 78% hyperspectral compression"
LABEL phi43="22.93606797749979"
# Install minimal system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl git hdf5-tools && \
rm -rf /var/lib/apt/lists/*
# Create app structure
WORKDIR /app
RUN mkdir -p /app/datasets /app/logs /app/models
# Copy production files
COPY requirements.txt .
COPY *.py .
COPY docker-entrypoint.sh .
COPY --from=python:3.11-slim /usr/local/lib/python3.11 /usr/local/lib/python3.11
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Production environment
ENV PHI43=22.93606797749979 \
DATA_DIR=/app/datasets \
OUTPUT_DIR=/app/logs \
PYTHONPATH=/app \
PORT=7860 \
HF_SPACE_PORT=7860
# Non-root security
RUN useradd --create-home --shell /bin/bash quantarion && \
chown -R quantarion:quantarion /app
USER quantarion
# HF Spaces compatibility
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:7860/status || exit 1
# Production volumes
VOLUME ["/app/datasets", "/app/logs"]
RUN chmod +x docker-entrypoint.sh
ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["production"]