Skip to content

Commit 7cee8aa

Browse files
committed
update DockM8 folder handling
1 parent 197f940 commit 7cee8aa

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

setup_py310.sh

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ else
127127
conda deactivate
128128
conda activate $ENV_NAME
129129

130-
conda config --add channels conda-forge bioconda schrodinger
130+
conda config --add channels conda-forge
131+
conda config --add channels bioconda
132+
conda config --add channels schrodinger
131133

132134
conda install rdkit=2023.09 ipykernel scipy spyrmsd kneed scikit-learn-extra molvs seaborn xgboost openbabel docopt chembl_structure_pipeline tqdm pydantic -q -y
133135

@@ -159,27 +161,20 @@ if [[ -f dockm8.py ]]; then
159161
DOCKM8_FOLDER=$(pwd)
160162
else
161163
if [ $USE_GIT -eq 1 ]; then
162-
# Replace wget logic with Git logic for DockM8 repository download
163164
echo -e "\nDownloading DockM8 repository using Git..."
164165
rm -rf ./DockM8
165166
git clone https://gitlab.com/DrugBud-Suite/DockM8.git -b main DockM8
166167
DOCKM8_FOLDER=$(pwd)/DockM8
167168
echo -e "\nDockM8 repository downloaded using Git."
168169
else
169-
# Use wget logic for DockM8 repository download (as in your original script)
170170
echo -e "\nDownloading DockM8 repository using wget..."
171171
rm -rf ./DockM8
172-
# Fetch the latest release information
173-
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/DrugBud-Suite/DockM8/releases/latest")
174-
# Extract the download URL for the tar.gz file
175-
DOWNLOAD_URL=$(echo "$LATEST_RELEASE" | grep "tarball_url" | cut -d '"' -f 4)
176-
# Download the latest release
177-
wget "$DOWNLOAD_URL" -O DockM8.tar.gz --no-check-certificate -q --show-progress
178-
tar -xf DockM8.tar.gz
179-
mv -f DockM8-main DockM8
172+
mkdir -p DockM8
173+
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/DrugBud-Suite/DockM8/releases/latest")
174+
DOWNLOAD_URL=$(echo "$LATEST_RELEASE" | grep "tarball_url" | cut -d '"' -f 4)
175+
wget "$DOWNLOAD_URL" -O - --no-check-certificate -q --show-progress | tar -xzf - -C DockM8 --strip-components=1
180176
DOCKM8_FOLDER=$(pwd)/DockM8
181-
rm DockM8.tar.gz
182-
echo -e "\nDockM8 repository downloaded using wget."
177+
echo -e "\nDockM8 repository downloaded using wget and extracted."
183178
fi
184179
fi
185180

0 commit comments

Comments
 (0)