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

conda.bat path #12

Closed
ZhaoJK opened this issue Jun 14, 2022 · 2 comments
Closed

conda.bat path #12

ZhaoJK opened this issue Jun 14, 2022 · 2 comments

Comments

@ZhaoJK
Copy link

ZhaoJK commented Jun 14, 2022

Hi,

It is amazing to setup cellpost under BIOP.
However, I am working within intranet and cannot modify PATH. I would like to request conda.bat setup unde Cellpose.
create new text input for conda.batl
or modify conda.bat path by adapting from cellpose env, like CellposeEnvDir -> "D:\Anaconda3\envs\cellpose", then conda.bat -> "D:\Anaconda3\condabin\conda.bat".

Thanks a lot!

@lacan
Copy link
Member

lacan commented Jun 23, 2022

Hello and thanks for the message.
Perhaps a workaround would be to configure the cellpose wrapper as follows:
Environment type: Python Venv
Cellpose environment name or directory : path/to/your/conda/env/python.exe/folder

Perhaps that way you can use it. I will try and test it myself

EDIT: IT DOESN'T WORK, I will make a new release
I will think about adding that extra layer you are requesting in case this does not work

@lacan
Copy link
Member

lacan commented Jun 23, 2022

So I have done the following and it works as expected on the last release of the extension
See 8786d4e
And tag v0.3.7

Install Cellpose with Cuda 11.3 GPU Support

conda create - cellpose-test python=3.8
conda activate cellpose-test
pip install cellpose
pip uninstall torch
pip install torch --extra-index-url https://download.pytorch.org/whl/cu113

Find the Python Executable

where python
C:\Users\oburri\.conda\envs\cellpose-test\python.exe

Use that path in the latest version of the Cellpose Extension

And Select Python Executable under "Cellpose Environment Type"
image

Run Cellpose and try it

Here is my result

INFO: Starting script at Thu Jun 23 13:30:09 CEST 2022
INFO: Using Cellpose Normalization (per tile).
INFO: Using global normalization with a downsampling factor of 8
INFO: If tiling is necessary, 0 pixels overlap will be taken between tiles
INFO: Folder creation of XXXXXXXXXXXXXXXX\cellpose-temp was interrupted. Either the folder exists or there was a problem.
INFO: Saving images for 1 tiles
INFO: Saving to XXXXXXXXXXXXXXXX\cellpose-temp\Temp_10511_10362.tif
INFO: Executing command: [cmd.exe /C C:\Users\oburri\.conda\envs\cellpose-test\python.exe -W ignore -m cellpose --dir N:\public\marine.bruand_UPORICCIO\BCL6_CTSS_Mut_20220309\20220309_Update_Oli\cellpose-temp --pretrained_model cyto --chan 0 --chan2 0 --diameter 0.0 --flow_threshold 0.4 --save_tif --no_npy --use_gpu --verbose]
INFO: Cellpose2D: 2022-06-23 13:30:15,639 [INFO] WRITING LOG OUTPUT TO C:\Users\oburri\.cellpose\run.log
INFO: Cellpose2D: 2022-06-23 13:30:15,875 [INFO] ** TORCH CUDA version installed and working. **
INFO: Cellpose2D: 2022-06-23 13:30:15,876 [INFO] >>>> using GPU
INFO: Cellpose2D: 2022-06-23 13:30:15,880 [INFO] >>>> running cellpose on 1 images using chan_to_seg GRAY and chan (opt) NONE
INFO: Cellpose2D: 2022-06-23 13:30:15,880 [INFO] ** TORCH CUDA version installed and working. **
INFO: Cellpose2D: 2022-06-23 13:30:15,880 [INFO] >>>> using GPU
INFO: Cellpose2D: 2022-06-23 13:30:15,880 [INFO] >> cyto << model set to be used
INFO: Cellpose2D: 2022-06-23 13:30:17,088 [INFO] >>>> model diam_mean =  30.000 (ROIs rescaled to this size during training)
INFO: Cellpose2D: 2022-06-23 13:30:17,089 [INFO] >>>> estimating diameter for each image
INFO: Cellpose2D: 2022-06-23 13:30:17,092 [INFO] 0%|          | 0/1 [00:00<?, ?it/s]
INFO: Cellpose2D: 2022-06-23 13:30:17,106 [INFO] ~~~ ESTIMATING CELL DIAMETER(S) ~~~
INFO: Cellpose2D: 2022-06-23 13:30:19,723 [INFO] estimated cell diameter(s) in 2.62 sec
INFO: Cellpose2D: 2022-06-23 13:30:19,723 [INFO] >>> diameter(s) = 
INFO: Cellpose2D: 2022-06-23 13:30:19,723 [INFO] [ 22.92 ]
INFO: Cellpose2D: 2022-06-23 13:30:19,723 [INFO] ~~~ FINDING MASKS ~~~
INFO: Cellpose2D: 2022-06-23 13:30:20,933 [INFO] >>>> TOTAL TIME 3.83 sec
INFO: Cellpose2D: 2022-06-23 13:30:20,945 [INFO] 100%|##########| 1/1 [00:03<00:00,  3.85s/it]
INFO: Cellpose2D: 2022-06-23 13:30:20,946 [INFO] 100%|##########| 1/1 [00:03<00:00,  3.85s/it]
INFO: Cellpose2D: 2022-06-23 13:30:20,946 [INFO] >>>> completed in 5.070 sec
INFO: Virtual Environment Runner Finished
INFO: Cellpose command finished running
INFO: Getting objects for XXXXXXXXXXXXXXXX\cellpose-temp\Temp_10511_10362_cp_masks.tif
INFO: Getting objects for XXXXXXXXXXXXXXXX\cellpose-temp\Temp_10511_10362_cp_masks.tif Done
INFO: Making measurements for Annotation (Rectangle)
INFO: Done!
INFO: Script run time: 14.28 seconds

@lacan lacan closed this as completed Jun 23, 2022
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

2 participants