Skip to content

Commit

Permalink
Skip conda install if intel
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Mar 4, 2024
1 parent 454b3a6 commit a6a039c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 4 additions & 0 deletions backend/python/common-env/transformers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ ifeq ($(BUILD_TYPE), hipblas)
CONDA_ENV_PATH = "transformers-rocm.yml"
endif

ifneq (,$(findstring sycl,$(BUILD_TYPE)))
export SKIP_CONDA=1
endif

.PHONY: transformers
transformers:
@echo "Installing $(CONDA_ENV_PATH)..."
Expand Down
16 changes: 10 additions & 6 deletions backend/python/common-env/transformers/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ conda_env_exists(){
! conda list --name "${@}" >/dev/null 2>/dev/null
}

if conda_env_exists "transformers" ; then
echo "Creating virtual environment..."
conda env create --name transformers --file $1
echo "Virtual environment created."
else
echo "Virtual environment already exists."
if [ $SKIP_CONDA == 1 ]; then
echo "Skipping conda environment installation"
else
if conda_env_exists "transformers" ; then
echo "Creating virtual environment..."
conda env create --name transformers --file $1
echo "Virtual environment created."
else
echo "Virtual environment already exists."
fi
fi

if [ "$PIP_CACHE_PURGE" = true ] ; then
Expand Down
2 changes: 1 addition & 1 deletion backend/python/diffusers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export CONDA_ENV_PATH = "diffusers-rocm.yml"
endif

ifneq (,$(findstring sycl,$(BUILD_TYPE)))
export SKIP=1
export SKIP_CONDA=1
endif

.PHONY: diffusers
Expand Down
2 changes: 1 addition & 1 deletion backend/python/diffusers/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ conda_env_exists(){
! conda list --name "${@}" >/dev/null 2>/dev/null
}

if [ $SKIP == 1 ]; then
if [ $SKIP_CONDA == 1 ]; then
echo "Skipping conda environment installation"
else
if conda_env_exists "diffusers" ; then
Expand Down

0 comments on commit a6a039c

Please sign in to comment.