Spaces:
Running
Running
File size: 1,317 Bytes
62f00e5 325aa05 136ea72 6d6dbaf aad7819 74b74f1 325aa05 9211c5d 136ea72 7b81543 bddc179 62f00e5 325aa05 136ea72 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | FROM node:20-alpine AS ui-builder
WORKDIR /ui
COPY ui/package.json ui/package-lock.json ./
RUN npm ci
COPY ui ./
RUN npm run build
FROM python:3.11-slim
WORKDIR /app
# Install dependencies first (cached layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all source files
COPY app.py .
COPY environment.py .
COPY models.py .
COPY graders.py .
COPY specialists.py .
COPY trust_ledger.py .
COPY task_graph.py .
COPY comms_bus.py .
COPY mission_context.py .
COPY sentinel_config.py .
COPY difficulty_controller.py .
COPY scenarios.py .
COPY openenv.yaml .
COPY inference.py .
COPY adversary.py .
COPY audit_ledger.py .
COPY cluster_rewards.py .
COPY cluster_trust_env.py .
COPY cluster_workers.py .
COPY gpu_pool.py .
COPY job_queue.py .
COPY README.md .
COPY pyproject.toml .
COPY server ./server
COPY static ./static
COPY outputs ./outputs
COPY --from=ui-builder /ui/out ./ui/out
# Create outputs directory for baseline scores
RUN mkdir -p outputs
# Expose port
EXPOSE 7860
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')" || exit 1
# Start server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|