Skip to content

Commit

Permalink
Merge pull request #102 from NSLS-II/2024-08-shutdown
Browse files Browse the repository at this point in the history
Update ptycho_gui installation deps
  • Loading branch information
padraic-shafer authored Aug 22, 2024
2 parents ad9ecce + 54d38ce commit cd6835d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
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

0 comments on commit cd6835d

Please sign in to comment.