Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using docker container to execute python script #9

Open
tischi opened this issue Nov 27, 2023 · 4 comments
Open

using docker container to execute python script #9

tischi opened this issue Nov 27, 2023 · 4 comments
Labels
question Further information is requested

Comments

@tischi
Copy link
Contributor

tischi commented Nov 27, 2023

@BioinfoTongLI

Here the python code is run within the context of the docker container, is it?

Could you explain how one could do the same without Nextflow, just on a CLI?

@tischi tischi added the question Further information is requested label Nov 27, 2023
@BioinfoTongLI
Copy link
Contributor

BioinfoTongLI commented Nov 28, 2023

Hi @tischi, that's correct.
If you want to run it with CLI, just make sure that you're in the your new environment and run with python blur.py --[your-args]
almost the same as in the process.
BTW: if you want to run the the other python scripts, you will need to install fire (the argument parser) with pip install fire

@tischi
Copy link
Contributor Author

tischi commented Nov 28, 2023

just make sure that you're in the your new environment

Sorry for being such a noob, but how do I do this when using docker? For conda, I know: conda activate ...

@BioinfoTongLI
Copy link
Contributor

you mean in your own docker env? just run the python blur.py part should be fine. If the expected python version is in your PATH

@krokicki
Copy link
Contributor

@tischi Sorry, I just saw this. You can use the Docker container as an environment by mounting your code/data into the container, like this:

docker run -it -v .:/opt bioinfotongli/ome-zarr-nextflow-minimum:latest /opt/bin/blur.py

This assumes you are in your cloned code base (ome-zarr-image-analysis-nextflow) and mounts the current directory as /opt. Then you can access the code as /opt/bin/blur.py. Hope that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants