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

Update ptycho_gui installation deps #102

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The conda environment `ptycho_production` is activated under the hood using the
To update the software, simple do `sudo conda update -n ptycho_production nsls2ptycho`

#### Manual Installation
1. Create a new conda environment named `ptycho_production`: `sudo conda create -n ptycho_production -c conda-forge python=3.9 pyfftw pyqt=5 numpy scipy matplotlib pillow h5py databroker openmpi mpi4py cython`. If you need beamline-specific packages, such as `hxntools` for HXN, append the package names in the `conda create` command. This helps resolve possible conflict/downgrade issues.
1. Create a new conda environment named `ptycho_production`: `sudo conda create -n ptycho_production -c conda-forge python=3.9 pyfftw pyqt=5 'numpy<2' scipy matplotlib pillow h5py 'databroker<=1.999' openmpi mpi4py cython`. If you need beamline-specific packages, such as `hxntools` for HXN, append the package names in the `conda create` command. This helps resolve possible conflict/downgrade issues.
The conda environment `ptycho_production` is activated under the hood using the `run-ptycho` script to be installed in Step 9.
2. Activate the environment: `conda activate ptycho_production`.
3. Install additional packages using pip: `pip install posix_ipc`.
Expand Down
2 changes: 1 addition & 1 deletion run-ptycho
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ if [ ! -d $PTYCHO_HOME ]; then
fi

# use the script installed by pip
/opt/conda_envs/ptycho_production/bin/run-ptycho
$CONDA_PREFIX/bin/run-ptycho
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@
# skip depending CuPy on OS X as the wheel is not provided
if not bcs.PLATFORM_DARWIN:
cuda_ver = str(bcs._cuda_version)
major = str(int(cuda_ver[:-2])//10)
minor = str(int(cuda_ver[-2:])//10)
major = int(cuda_ver[:-2])//10
minor = int(cuda_ver[-2:])//10
if major > 10:
# Newer versions of CuPy are published as cupy-cuda11x, cupy-cuda12x, etc
minor = "x"
# Older versions of CuPy are published as cupy-cuda80, cupy-cuda102, etc
major = str(major)
minor = str(minor)
try:
import cupy
except ImportError:
Expand Down
Loading