implement persistent docker containers - #6
Open
magland wants to merge 2 commits into
Open
Conversation
satra
reviewed
Jul 25, 2025
|
|
||
| ```bash | ||
| # Start a container with the default image (jupyter/scipy-notebook:latest) | ||
| minicline docker start |
Contributor
There was a problem hiding this comment.
we should perhaps add that this will mount the current working directory into the container.
Owner
Author
There was a problem hiding this comment.
I have updated the docs, comments, etc with this info.
satra
approved these changes
Aug 2, 2025
Contributor
|
@magland - the tool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@satra The below is AI-generated (as you can guess - but I reviewed it carefully) - but I'm human in this paragraph :). This adds a new persistent docker container mode, as you were describing in #5, but the old method of running commands in a container is still there - and is the default. We'll need to decide on whether to remove that or not given this persistent docker functionality.
Summary
This PR implements persistent Docker container functionality to address the issue where installations and changes made inside containers were lost between command executions. Previously, each
execute_commandcall created a new temporary container with the--rmflag, causing anypip installor other modifications to be forgotten.Changes
New Docker Management Commands
minicline docker start [image] [--name container-name]- Start a persistent Docker containerminicline docker stop <container-name>- Stop and remove a persistent containerminicline docker list- List all minicline containersminicline perform-task --docker <container-name>- Execute tasks using an existing persistent containerImplementation Details
New
DockerManagerclass (minicline/docker_manager.py)CLI Integration (
minicline/cli.py)dockercommand group withstart,stop, andlistsubcommands--dockeroption toperform-taskcommandCore Functionality Updates
perform_task()incore.pyto acceptdocker_containerparameterexecute_command()intools/execute_command.pyto support persistent containersDocumentation (
README.md)Example Usage
Benefits