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

Add Docker Support for scgpt #105

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xueerchen1990
Copy link

Hello,

I've noticed that the scGPT project could benefit from Docker to streamline setup and ensure consistent environments. This pull request introduces a Dockerfile to facilitate this.

Changes Made:

  • Added a Dockerfile to allow users to create a Docker container for the project.
  • Updated README.md with instructions on how to build the Docker image or pull it from Docker Hub, and run it.

I believe this addition will make the project more accessible to users unfamiliar with its dependencies and setup. It also provides an easy way for anyone to run the project in an isolated environment, avoiding potential conflicts with other installed software.

Please review the changes, and let me know if any modifications are needed. Looking forward to your feedback!

Best regards,
xueer

@subercui
Copy link
Member

Thank you! Will test the docker. In the meantime, the current repo will require running on GPU. Can the current docker access GPUs? Is Nvidia container required?

@xueerchen1990
Copy link
Author

Thank you! Will test the docker. In the meantime, the current repo will require running on GPU. Can the current docker access GPUs? Is Nvidia container required?

Yes, it runs on GPUs and requires NVIDIA container.

I installed nvidia container tookit following these instructions

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list \
  && \
    sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit

@xueerchen1990
Copy link
Author

xueerchen1990 commented Nov 1, 2023

I tested the tutorial Tutorial_Annotation.ipynb with the docker container on RTX 3090. It runs end-to-end without errors. Please find the log below and let me know if there are any changes to be made.

wandb: Run summary:
wandb:                        epoch 10
wandb: info/post_freeze_param_count 51340819
wandb:  info/pre_freeze_param_count 51340819
wandb:                test/accuracy 0.86798
wandb:                test/macro_f1 0.69984
wandb:               test/precision 0.73018
wandb:                  test/recall 0.70162
wandb:                    train/cls 0.03363
wandb:                    valid/err 0.13202

@sureshpatel66
Copy link

Could you please provide more information about the where to access Docker for scGPT.

@xueerchen1990
Copy link
Author

Could you please provide more information about the where to access Docker for scGPT.

  1. Make sure there is a not-too-old NVIDIA GPU available.
  2. install docker command line tool and NVIDIA container tool kit using this bash script
  3. build or pull the docker image and run following these instructions

@sarudak
Copy link

sarudak commented Dec 21, 2023

@xueerchen1990 Wanted to say that I had a hard time getting scGPT to run because of dependency issues but was able to use the dockerfile and instructions from your branch and everything worked great. Had to add the following lines to get it to work with the perturbation and GRN examples.

RUN pip install torch_geometric
RUN pip install cell-gears
RUN pip install gseapy

Also added jupyter lab for convenience.
Super helpful thank you

@xueerchen1990
Copy link
Author

@sarudak thank you so much for the feedback. I can include your inputs and pull the latest from the main branch and test again. Happy holiday! 🎉

@TorinK2
Copy link

TorinK2 commented Apr 9, 2024

Hello, just wanted to add that I found this PR super helpful with getting scGPT up and running!

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

Successfully merging this pull request may close these issues.

5 participants