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 pixi support for multiple platforms #43

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

Conversation

mkitti
Copy link

@mkitti mkitti commented Nov 19, 2024

Add multiple platform pixi support including for Windows.

To install pixi do the following:

curl -fsSL https://pixi.sh/install.sh | bash

The procedure to run and install the code is then as follows:

git clone [email protected]:janelia-cellmap/cellmap-segmentation-challenge.git
cd cellmap-segmentation-challenge
git checkout win-64-pixi
pixi install
pixi run csc

If you wanted to a shell similar to activating a conda environment:

pixi shell
csc

@rhoadesScholar rhoadesScholar self-requested a review November 20, 2024 15:52
@rhoadesScholar
Copy link
Member

rhoadesScholar commented Nov 20, 2024

  • Add the pixi install to the docs as the main suggestion, keeping micromamba as an alternative

@mkitti
Copy link
Author

mkitti commented Nov 20, 2024

I posted the revised README here:
https://github.com/mkitti/cellmap-segmentation-challenge/blob/win-64-pixi/README.md

I think we should defer GPU support and autocompletion support to a different pull request as both require more extensive testing.

Copy link
Member

@rhoadesScholar rhoadesScholar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See request about activitating pixi environment.

### Using the pixi environment

To use the pixi environment, you can either prefix the commands below with `pixi run` (e.g. `pixi run csc --fetch-data`),
or use `pixi shell` which is similar to activating an environment with `conda` or `mamba`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkitti Can you give the specific line to "activate" the pixi environment that was just created, so they can use it just like a mamba environment (i.e. so that the rest of the instructions are still accurate)? Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it simply pixi shell csc?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just pixi shell as I wrote. This will look for the local pyproject.toml and "activate" the environment based on that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I see there is an issue with fastremap at the moment. I'll try to address that in an hour.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhoadesScholar Just checking in. I resolved the issue I was seeing with fastremap.

To clarify, to "activate" the environment, you have first cd cellmap-segmentation-challenge and then run pixi shell.

There's another way which is to execute the following in the shell.

eval "$(pixi shell-hook)"
csc

See more information here:
https://pixi.sh/dev/features/environment/#activation

@rhoadesScholar
Copy link
Member

Re: conversation with @mkitti
He will investigate possibility of pixi global install such that csc <COMMAND> can be successfully executed from anywhere without activating a virtual environment, on Windows, Mac, and Linux. :)

@rhoadesScholar
Copy link
Member

Re: conversation with @mkitti He will investigate possibility of pixi global install such that csc <COMMAND> can be successfully executed from anywhere without activating a virtual environment, on Windows, Mac, and Linux. :)

any movement on this @mkitti?

@mkitti
Copy link
Author

mkitti commented Dec 16, 2024

I have not worked on it over the last week.

Setting up the global install is going to be quite a bit of work because it essentially means we have to package the project itself for conda.

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.

2 participants