This guide explains how to build and run the RobfarmerModel using Docker.
- Docker installed on your system
- NVIDIA Docker runtime (for GPU support)
- Copy the Robofarmer-II directory from elvex.sintef.no:/data/robofarmer to your home directory
Build the Docker image with the following command:
podman build -t robofarmer:latest .Note: The build process will:
- Use NVIDIA PyTorch base image with CUDA support
- Install system dependencies and build tools
- Set up Anaconda environment
- Clone the repository and install dependencies
- Build OpenCV with CUDA support
- Extract the dataset from
Robofarmer-II.tar.gz
podman run -it --rm robofarmer:latestpodman run -it --rm --gpus all robofarmer:latestpodman run -it --rm --device nvidia.com/gpu=0 \
-v $(pwd)/Robofarmer-II:/app/data/datasets/Robofarmer-II \
robofarmer:latestpodman run -dit --shm-size=24g --device nvidia.com/gpu=0 --name robofarmer -v $HOME/Robofarmer-II:/app/data/datasets/Robofarmer-II bashpodman attach robofarmerThe container's working directory is /app, which contains:
/app/src- The cloned RobfarmerModel repository/app/data- Dataset directory/app/opencv- OpenCV source code
The container uses a conda environment called samclip. To activate it within the container:
conda activate robrobofarmerOnce inside the container, you can run the model scripts:
# Activate the environment
conda activate robofarmer
# Navigate to source directory
cd src/interaction_hotspotsIn the interaction_hotspots directory, there are README files explaining how to train and evaluate models and to visualize heatmaps using trained models.