Skills

Docker

Execute research code inside isolated Docker containers for safe replication...

Install

npx skills add Companion-Inc/feynman --skill docker -g -a claude-code -y
Repository
Companion-Inc/feynman10.1k
Category
DevOps
Updated
4d ago
License
MIT
Context cost
Lightabout 596 tokens
Runs scripts
No, instructions only

What it does

Execute research code inside isolated Docker containers for safe replication, experiments, and benchmarks. Use when the user selects Docker as the execution environment or asks to run code safely, in isolation, or in a sandbox.

Docker Sandbox

Run research code inside Docker containers while Feynman stays on the host. The container gets the project files, runs the commands, and results sync back.

When to use

  • User selects "Docker Sandbox" as the execution environment in /replicate or /autoresearch
  • Running untrusted code from a paper's repository
  • Experiments that install packages or modify system state
  • Any time the user asks to run research code safely or isolated for a Feynman workflow

How it works

  1. Build or pull an appropriate base image for the research code
  2. Mount the project directory into the container
  3. Run experiment commands inside the container
  4. Results write back to the mounted directory

Running commands in a container

For Python research code (most common):

docker run --rm -v "$(pwd)":/workspace -w /workspace python:3.11 bash -c "
  pip install -r requirements.txt &&
  python train.py
"

For projects with a Dockerfile:

docker build -t feynman-experiment .
docker run --rm -v "$(pwd)/results":/workspace/results feynman-experiment

For GPU workloads:

docker run --rm --gpus all -v "$(pwd)":/workspace -w /workspace pytorch/pytorch:latest bash -c "
  pip install -r requirements.txt &&
  python train.py
"

Choosing the base image

Research typeBase image
Python ML/DLpytorch/pytorch:latest or tensorflow/tensorflow:latest-gpu
Python generalpython:3.11
Node.jsnode:20
R / statisticsrocker/r-ver:4
Juliajulia:1.10
Multi-languageubuntu:24.04 with manual installs

Persistent containers

For iterative experiments (like /autoresearch), create a named container instead of --rm. Choose a descriptive name based on the experiment:

Read the whole SKILL.md on GitHub

More in DevOps