Skip to content

Commit 4e19e92

Browse files
committed
Merge branch 'develop' of github.com:OpenSourceBrain/OSBv2 into develop
2 parents 426dcc0 + 767dc14 commit 4e19e92

4 files changed

Lines changed: 25 additions & 15 deletions

File tree

applications/jupyterlab/requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# temporary fix until new NEST releases are made with the fix: https://github.com/nest/nest-simulator/issues/3495
2+
cython<3.1.0
3+
14
pyneuroml
25
pyelectro
36
git+https://github.com/NeuralEnsemble/neurotune.git
@@ -71,4 +74,4 @@ OSBModelValidation==0.3.5
7174

7275

7376
#### Final updates
74-
numpy # Removes some issues with LFPy...
77+
numpy # Removes some issues with LFPy...

applications/workspaces/tasks/biomodels-copy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM $CLOUDHARNESS_BASE
33

44
# much faster than curl/wget
55
# https://pkgs.alpinelinux.org/packages?name=aria2&branch=edge
6-
RUN apt-get update && apt-get install -y aria2 unzip
6+
RUN apt-get update && apt-get install -y aria2 unzip util-linux
77

88

99
ADD . /

applications/workspaces/tasks/biomodels-copy/run.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,31 @@ if [ -z "$paths" ]; then
2222
aria2c --retry-wait=2 --max-tries=5 --timeout=300 --max-concurrent-downloads=5 --max-connection-per-server=5 --allow-overwrite="true" --auto-file-renaming="false" --out="$timestamp.omex" "https://www.ebi.ac.uk/biomodels/model/download/${url}"
2323
unzip -o "$timestamp.omex" && rm -vf "$timestamp.omex"
2424
else
25-
touch filelist
26-
# Split paths by ## and checkout each path
27-
IFS='\'
28-
for path in $paths; do
29-
echo Biomodels copy "${path}" to "${download_path}"
30-
echo "${path}" >> filelist
31-
done
3225
# Move to temporary directory to rename only the downloaded files.
3326
# Otherwise we risk renaming all files, even ones where the user has used
3427
# '+' in the file name explicitly
3528
tempdir=$(mktemp -d)
3629
echo Biomodels downloading files in "${tempdir}"
3730
pushd "${tempdir}"
38-
aria2c --retry-wait=2 --max-tries=5 --input-file=filelist --max-concurrent-downloads=5 --max-connection-per-server=5 --allow-overwrite "true" --auto-file-renaming "false"
31+
filelist=$(mktemp)
32+
echo "Storing file list in ${filelist}"
33+
34+
# Split paths by ## and checkout each path
35+
IFS='\'
36+
for path in $paths; do
37+
echo Biomodels copy "${path}" to "${download_path}"
38+
echo "${path}" >> "${filelist}"
39+
done
40+
41+
aria2c --retry-wait=2 --max-tries=5 --input-file="${filelist}" --max-concurrent-downloads=5 --max-connection-per-server=5 --allow-overwrite "true" --auto-file-renaming "false"
42+
rm "${filelist}" -f
43+
3944
rename -a '+' ' ' *.*
45+
4046
popd
4147
mv -v "${tempdir}/"* .
4248
# directory should be empty, so rmdir will work
4349
rmdir "${tempdir}"
44-
rm filelist -f
4550
fi
4651

4752
# fix permissions

applications/workspaces/tasks/figshare-copy/run.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,25 @@ export download_path=`echo $shared_directory | cut -d ":" -f 2`/"${folder}"
99
mkdir -p "${download_path}"
1010
cd "${download_path}"
1111

12+
filelist=$(mktemp)
13+
1214
# if a file url is passed
1315
if echo "${url}" | grep -E "https://" 2>&1 > /dev/null
1416
then
1517
echo Figshare copy "${url}" to "${download_path}"
16-
echo "${url}" > filelist
18+
echo "${url}" > "${filelist}"
1719
else
1820
# if the article id is passed, download all files
1921
echo Figshare copy all files of article "${url}" to "${download_path}"
20-
curl -X GET "https://api.figshare.com/v2/articles/${url}/files" | tr "}" "\n" | grep -Eo "https://ndownloader.figshare.com/files/[[:digit:]]+" > filelist
22+
curl -X GET "https://api.figshare.com/v2/articles/${url}/files" | tr "}" "\n" | grep -Eo "https://ndownloader.figshare.com/files/[[:digit:]]+" > "${filelist}"
2123
fi
2224

2325
# multiple downloads concurrently, with multiple connections to the server
2426
# overwrite files if they are downloaded again
25-
aria2c --retry-wait=2 --max-tries=5 --input-file=filelist --max-concurrent-downloads=5 --max-connection-per-server=5 --allow-overwrite "true" --auto-file-renaming "false"
27+
aria2c --retry-wait=2 --max-tries=5 --input-file="${filelist}" --max-concurrent-downloads=5 --max-connection-per-server=5 --allow-overwrite "true" --auto-file-renaming "false"
2628

2729
# delete the file list
28-
rm filelist -f
30+
rm "${filelist}" -f
2931

3032
# fix permissions
3133
chown -R 1000:100 "${download_path}"

0 commit comments

Comments
 (0)