Aqarion commited on
Commit
7099e55
·
verified ·
1 Parent(s): 99dfc2f

Create PRODUCTION-DOCKERFILE

Browse files
Files changed (1) hide show
  1. PRODUCTION-DOCKERFILE +50 -0
PRODUCTION-DOCKERFILE ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # QUANTARION-DOCKER-AI: BORION φ⁴³ Hyperspectral Compression
2
+ # HF Spaces Production Deployment - 78% L3 Live
3
+ FROM python:3.11-slim
4
+
5
+ LABEL maintainer="AQARION / BORION TEAM"
6
+ LABEL version="1.0.0"
7
+ LABEL description="BORION φ⁴³ L3 78% hyperspectral compression"
8
+ LABEL phi43="22.93606797749979"
9
+
10
+ # Install minimal system dependencies
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ curl git hdf5-tools && \
13
+ rm -rf /var/lib/apt/lists/*
14
+
15
+ # Create app structure
16
+ WORKDIR /app
17
+ RUN mkdir -p /app/datasets /app/logs /app/models
18
+
19
+ # Copy production files
20
+ COPY requirements.txt .
21
+ COPY *.py .
22
+ COPY docker-entrypoint.sh .
23
+ COPY --from=python:3.11-slim /usr/local/lib/python3.11 /usr/local/lib/python3.11
24
+
25
+ # Install Python dependencies
26
+ RUN pip install --no-cache-dir -r requirements.txt
27
+
28
+ # Production environment
29
+ ENV PHI43=22.93606797749979 \
30
+ DATA_DIR=/app/datasets \
31
+ OUTPUT_DIR=/app/logs \
32
+ PYTHONPATH=/app \
33
+ PORT=7860 \
34
+ HF_SPACE_PORT=7860
35
+
36
+ # Non-root security
37
+ RUN useradd --create-home --shell /bin/bash quantarion && \
38
+ chown -R quantarion:quantarion /app
39
+ USER quantarion
40
+
41
+ # HF Spaces compatibility
42
+ EXPOSE 7860
43
+ HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:7860/status || exit 1
44
+
45
+ # Production volumes
46
+ VOLUME ["/app/datasets", "/app/logs"]
47
+
48
+ RUN chmod +x docker-entrypoint.sh
49
+ ENTRYPOINT ["./docker-entrypoint.sh"]
50
+ CMD ["production"]