File size: 986 Bytes
48fe669 | 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 | # Dockerfile for Robotics Subnet Miner Policy Server
#
# This creates a FastAPI server that exposes your policy for validator queries.
#
# Build: docker build -t your-username/robo-policy:v1 .
# Test: docker run -p 8000:8000 your-username/robo-policy:v1
# Push: docker push your-username/robo-policy:v1
#
# Deploy to Basilica: kinitro miner push --repo user/policy --revision abc123
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy policy server code
COPY server.py .
COPY policy.py .
# Copy model weights (uncomment and modify as needed)
# COPY model.pt .
# COPY models/ ./models/
# Expose port for FastAPI
EXPOSE 8000
# Run the FastAPI server
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]
|