Skip to content

Commit

Permalink
[Cylon] replace export condition in mac, win and conda side effect
Browse files Browse the repository at this point in the history
Signed-off-by: Arup Sarker <[email protected]>
  • Loading branch information
arupcsedu committed Jun 9, 2024
1 parent 25990e3 commit efb1653
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: conda init $(basename ${SHELL})

- name: Include $CONDA in $PATH
run: echo ::add-path::$CONDA/condabin
run: export PATH="$CONDA/condabin:$PATH"

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
12 changes: 9 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ def build_cpp():
verb = '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' if args.verbose else ''
clean = '--clean-first' if args.clean else ''

if OS_NAME == 'Linux':
pyarrow_location = os.path.dirname(pa.__file__)
conda_prefix = check_conda_prefix()
pyarrow_location = os.path.dirname(pa.__file__)
conda_prefix = check_conda_prefix()
if OS_NAME == 'Linux' or OS_NAME == 'Darwin':
if not os.path.exists(f"{conda_prefix}/lib/libarrow_python.so"):
sym_generator = f"ln -s {pyarrow_location}/libarrow_python.so {conda_prefix}/lib/libarrow_python.so"
logger.info(f"Generate Symbolic link: {sym_generator}")
Expand All @@ -238,6 +238,12 @@ def build_cpp():

os.environ['MPI_CXX']=f"{conda_prefix}/bin/mpicxx"
logger.info(f"export mpicxx: : {os.getenv('MPI_CXX')}")
else:
if not os.path.exists(f"{conda_prefix}/lib/libarrow_python.so"):
sym_generator = f"mlink {pyarrow_location}/libarrow_python.so {conda_prefix}/lib/libarrow_python.so"
logger.info(f"Generate Symbolic link: {sym_generator}")
res = subprocess.call(sym_generator, cwd=BUILD_DIR, shell=True)
check_status(res, "Generate Symbolic link")


cmake_command = f"cmake -DPYCYLON_BUILD={on_off(BUILD_PYTHON)} {win_cmake_args} " \
Expand Down
8 changes: 4 additions & 4 deletions conda/environments/gcylon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ channels:
- defaults
dependencies:
- cudf
- cuda-toolkit=12
- cuda-runtime=12
- cuda-nvcc=12
- cuda-cudart=12
- cuda-toolkit=11.8
- cuda-runtime=11.8
- cuda-nvcc=11.8
- cuda-cudart=11.8
- python=3.11
- cmake
#- arrow-cpp=9
Expand Down

0 comments on commit efb1653

Please sign in to comment.