Spaces:
Runtime error
Runtime error
| # Stage 1: Build your Rust engine binary natively | |
| FROM rust:latest as builder | |
| WORKDIR /build | |
| COPY . . | |
| RUN cargo build --release | |
| # Stage 2: Create runtime environment with Python | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install git and download the official lichess-bot directly into /app | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| RUN git clone https://github.com/lichess-bot-devs/lichess-bot.git . | |
| # Install packages required by the official framework | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create separate directory for your engine and transfer binary from the builder | |
| RUN mkdir -p engines | |
| COPY --from=builder /build/target/release/VeloCT_Base ./engines/VeloCT_Base | |
| # Move custom workspace config and start script into position | |
| COPY config.yml . | |
| COPY start.sh . | |
| # Ensure standard startup wrapper can execute inside the container | |
| RUN chmod +x start.sh | |
| # Run script to safely update binary permissions and bring bot environment online | |
| CMD ["./start.sh"] | |