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

how to run "run_prediction.py" in a alphafold docker instance? #14

Open
patycake57 opened this issue Mar 8, 2024 · 7 comments
Open

Comments

@patycake57
Copy link

I have alphafold 2.3.2 installed and running using: python3 alphafold/docker/run_docker.py ...

but I can't figure out how to run TCRdock's run_prediction.py "in the alphafold docker instance"

Apologies for my lack of familiarity with docker.
Thanks, Keen to give this a try.

@phbradley
Copy link
Owner

I think I replied to this by email but let me know if that's not the case! If it works we can add a description here...

@phbradley
Copy link
Owner

phbradley commented Mar 8, 2024 via email

@eliasball
Copy link
Contributor

eliasball commented Mar 8, 2024

Hi there!
Yes, I actually built a Docker container specifically for TCRdock, you can find it in the docker folder here in the repo.

You have to cd into the docker folder where you can then do docker build -t tcrdock . to build the container.
You can then run the container using the docker run command, the name of the image will be tcrdock. In this documentation, you can find instructions as to how to mount folders into the container so that you can access your input/output files.
Once you are in the container you can run the TCRdock python files via python /opt/TCRdock/run_prediction.py for example.

Hope this helps, if there are further questions just ask :D

Oh, and one more thing: If you want to use GPUs for the predictions, you need to perform steps 1 and 4 as described in the alphafold repository. You then need to use the --gpus all flag in you docker run command.

@phbradley
Copy link
Owner

phbradley commented Mar 8, 2024 via email

@eliasball
Copy link
Contributor

Awesome! Thanks so much, Elias. Perfect timing for this request!

________________________________ From: Elias Ball @.> Sent: Friday, March 8, 2024 7:21 AM To: phbradley/TCRdock @.> Cc: Bradley PhD, Phil @.>; Comment @.> Subject: Re: [phbradley/TCRdock] how to run "run_prediction.py" in a alphafold docker instance? (Issue #14) CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi there! Yes, I actually built a Docker container specifically for TCRdock, you can find it in the docker folder here in the repo. You have to cd into the docker folder where you can then do docker build -t tcrdock . to build the container. You can then run the container using the docker run commandhttps://urldefense.com/v3/__https://docs.docker.com/reference/cli/docker/container/run/__;!!GuAItXPztq0!lr4PuCc4xCmeEWjxnSYJukiPXFFj_FHUBK8RY9peCPYPJGaW16fUQxK9B_Gvq2AlTNU-xDGrDQ87W2zb3MFx9sM-$, the name of the image will be tcrdock. In this documentation, you can find instructions as to how to mount folders into the container so that you can access your input/output files. Once you are in the container you can run the TCRdock python files via python /opt/TCRdock/run_prediction.py for example. Hope this helps, if there are further questions just ask :D — Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/phbradley/TCRdock/issues/14*issuecomment-1985883033__;Iw!!GuAItXPztq0!lr4PuCc4xCmeEWjxnSYJukiPXFFj_FHUBK8RY9peCPYPJGaW16fUQxK9B_Gvq2AlTNU-xDGrDQ87W2zb3CuPUwEY$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABBNCH4J2SZS5WPV7T7CUJDYXHJPLAVCNFSM6AAAAABEMDDUCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBVHA4DGMBTGM__;!!GuAItXPztq0!lr4PuCc4xCmeEWjxnSYJukiPXFFj_FHUBK8RY9peCPYPJGaW16fUQxK9B_Gvq2AlTNU-xDGrDQ87W2zb3C_3Uogx$. You are receiving this because you commented.Message ID: @.***>

Of course, happy to help :)

@patycake57
Copy link
Author

Thanks so much! I got the docker container to work. Running it like this:

docker run --gpus all -it
--mount type=bind,source=/path/to/tcrdock,target=/path/to/tcrdock
--mount type=bind,source=/path/to/AFdatabase,target=/path/to/AFdatabase
tcrdock bash

Then I run the python programs as per the instructions. If I'm doing something dumb, let me know. I'm not that familiar with this stuff.

@kamurani
Copy link

@patycake57 I am doing something similar; just note that depending on how the permissions are configured in your host filesystem directories, you may not be able to write output to the mounted directory from within the container itself. Let us know how you get on!

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

No branches or pull requests

4 participants