# Submission will be executed with this image FROM huggingface/competitions:latest # Default to running on train split only ENV BATTERYSWAP_SPLITS=train ENV BATTERYSWAP_SUBMISSION_PATH=submission.csv WORKDIR /app # NOTE: allowed requirements are specified by competition # WARNING: Your customizations in requirements.txt will be ignored COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt # Copy relevant files # You can copy more in here, if needed # (or just keep it under batteryswap_example/) COPY batteryswap_example/ ./batteryswap_example COPY script.py ./ # The competition env (with the pinned packages) lives at /app/env; newer # base-image entrypoints put miniconda first on PATH at runtime, which shadows # it and breaks `python3 script.py` with ModuleNotFoundError. Pin it back. ENV PATH=/app/env/bin:${PATH} # Default to making submissions CMD python3 script.py