Skip to content

Commit

Permalink
fix conda install script
Browse files Browse the repository at this point in the history
  • Loading branch information
ddPn08 committed Dec 19, 2022
1 parent 69c7aed commit a83f5cf
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions automatic1111.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "Ao2t5h5qG9HD"
},
"outputs": [],
Expand Down Expand Up @@ -327,19 +326,21 @@
" ! bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /usr/local\n",
" ! rm Miniconda3-latest-Linux-x86_64.sh\n",
"\n",
"\n",
"if os.path.exists(gdrive_env_file) and not os.path.exists(\"/usr/local/envs/automatic\") and not force_reinstall_environmemt:\n",
" os.makedirs(\"/usr/local/envs/automatic\", exist_ok=True)\n",
" ! cd stable-diffusion-webui && conda env update -n automatic -f ./environment-wsl2.yaml\n",
" ! zstd -dc {gdrive_env_file} | tar -xf - -C /usr/local/envs/automatic\n",
"else:\n",
" ! cd stable-diffusion-webui && conda env create -f ./environment-wsl2.yaml\n",
"\n",
"install_script = \"\"\"#!/bin/bash\n",
"eval \"$(conda shell.bash hook)\"\n",
"cd stable-diffusion-webui\n",
"conda env create -f ./environment-wsl2.yaml\n",
"conda activate automatic\n",
"conda install -y xformers -c xformers/label/dev\n",
"python3 -m pip install --upgrade tensorrt\n",
"python -c 'from launch import prepare_environment; prepare_environment()'\"\"\"\n",
"\n",
"if os.path.exists(gdrive_env_file) and not os.path.exists(\"/usr/local/envs/automatic\") and not force_reinstall_environmemt:\n",
" os.makedirs(\"/usr/local/envs/automatic\", exist_ok=True)\n",
" ! zstd -dc {gdrive_env_file} | tar -xf - -C /usr/local/envs/automatic\n",
"\n",
"! {install_script}\n",
"\n",
"os.environ[\"LD_LIBRARY_PATH\"] = f\"{os.environ['LD_LIBRARY_PATH']}:/usr/local/envs/automatic/lib\"\n",
Expand Down

0 comments on commit a83f5cf

Please sign in to comment.