# Cloud Run with NVIDIA L4 GPU — build from backend/: # docker build -f Dockerfile.gpu -t cepheus-api-gpu . # # Deploy (example): # gcloud run deploy cepheus-api --image ... --gpu 1 --gpu-type nvidia-l4 \ # --set-env-vars "CEPHEUS_CLOUD=1,CEPHEUS_GPU_VISION=1,CEPHEUS_PRODUCTION=1" \ # --memory 16Gi --cpu 4 --timeout 3600 --max-instances 1 FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ python3.11 python3-pip python3.11-venv \ libglib2.0-0 libgomp1 libgl1 \ && rm -rf /var/lib/apt/lists/* WORKDIR /app ENV PYTHONUNBUFFERED=1 ENV CEPHEUS_CLOUD=1 ENV CEPHEUS_GPU_VISION=1 ENV PORT=8080 COPY requirements-gpu.txt /app/requirements-gpu.txt COPY requirements.txt /app/requirements.txt RUN pip3 install --no-cache-dir -r /app/requirements-gpu.txt \ && pip3 install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cu121 COPY main.py vision_engine.py vision_engine_cloud.py vision_runtime.py \ agentic_service.py agentic_orchestrator.py gemini_config.py emergency_maps_service.py face_metadata.py \ alert_routing.py auth_service.py refresh_token_store.py \ observability.py security_headers.py rate_limiter.py persistence.py security_config.py store_locks.py /app/ COPY Face_Recognition/ /app/Face_Recognition/ RUN mkdir -p /app/data /app/uploads EXPOSE 8080 CMD ["sh", "-c", "exec python3.11 -m uvicorn main:app --host 0.0.0.0 --port ${PORT:-8080}"]