scGPT icon indicating copy to clipboard operation
scGPT copied to clipboard

Add Docker Support for scgpt

Open xueerchen1990 opened this issue 2 years ago • 8 comments

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

xueerchen1990 avatar Oct 29 '23 16:10 xueerchen1990

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?

subercui avatar Oct 31 '23 14:10 subercui

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 avatar Oct 31 '23 19:10 xueerchen1990

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

xueerchen1990 avatar Nov 01 '23 18:11 xueerchen1990

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

sureshpatel66 avatar Nov 02 '23 20:11 sureshpatel66

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

xueerchen1990 avatar Nov 02 '23 22:11 xueerchen1990

@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

sarudak avatar Dec 21 '23 21:12 sarudak

@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! 🎉

xueerchen1990 avatar Dec 22 '23 16:12 xueerchen1990

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

TorinK2 avatar Apr 09 '24 23:04 TorinK2