-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1281 from virtualcell/1280-publication-edit-form
publication edit form properly handle biomodel and mathmodel ref ids
- Loading branch information
Showing
38 changed files
with
778 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,20 +230,19 @@ build_mongo() { | |
} | ||
|
||
build_batch_singularity() { | ||
# turn on logging of commands | ||
set -x | ||
if [ "$skip_singularity" == "false" ]; then | ||
if [ -x "$(command -v singularity)" ]; then | ||
build_batch_singularity_direct | ||
if [[ $? -ne 0 ]]; then echo "failed to build singularity image using singularity commands"; exit 1; fi | ||
else | ||
if [ -x "$(command -v vagrant)" ]; then | ||
build_batch_singularity_vagrant | ||
if [[ $? -ne 0 ]]; then echo "failed to build singularity image using singularity vagrant box"; exit 1; fi | ||
else | ||
echo "found neither singularity nor vagrant, cannot build singularity image" | ||
exit 1 | ||
fi | ||
fi | ||
echo "singularity not found, cannot build singularity image" | ||
exit 1 | ||
fi | ||
fi | ||
# turn off logging of commands | ||
set +x | ||
} | ||
|
||
build_batch_singularity_direct() { | ||
|
@@ -301,103 +300,16 @@ EOF | |
cd .. | ||
} | ||
|
||
build_batch_singularity_vagrant() { | ||
echo "" | ||
cmd="cd singularity-vm" | ||
cd singularity-vm | ||
echo "" | ||
echo "CURRENT DIRECTORY IS $PWD" | ||
|
||
# | ||
# prepare Vagrant Singularity box for building the singularity image (bring up, install cert) | ||
# | ||
echo "" | ||
echo "generating singularity image for vcell-batch and uploading to remote server for HTC cluster" | ||
cmd="sudo scp $ssh_key [email protected]:/usr/local/deploy/registry_certs/domain.cert ." | ||
echo $cmd | ||
($cmd) || (echo "failed to download cert from vcell-docker private Docker registry") | ||
|
||
echo "" | ||
echo "vagrant up" | ||
vagrant up | ||
if [[ $? -ne 0 ]]; then echo "failed to bring vagrant up"; fi | ||
|
||
echo "" | ||
remote_cmd="sudo cp /vagrant/domain.cert /usr/local/share/ca-certificates/vcell-docker.cam.uchc.edu.crt" | ||
echo "vagrant ssh -c \"$remote_cmd\"" | ||
vagrant ssh -c "$remote_cmd" | ||
if [[ $? -ne 0 ]]; then echo "failed to upload domain.cert to trust the private Docker registry" && exit 1; fi | ||
|
||
echo "" | ||
remote_cmd="sudo update-ca-certificates" | ||
echo "vagrant ssh -c \"$remote_cmd\"" | ||
vagrant ssh -c "$remote_cmd" | ||
if [[ $? -ne 0 ]]; then | ||
echo "failed to update ca certificates in vagrant box" && exit 1 | ||
fi | ||
# | ||
# create temporary Singularity file which imports existing docker image from registry and adds a custom entrypoint | ||
# | ||
_vcell_batch_docker_name="${repo}/vcell-batch:${tag}" | ||
_singularity_image_file="${_vcell_batch_docker_name//[\/:]/_}.img" | ||
_singularity_file="Singularity_${_vcell_batch_docker_name//[\/:]/_}" | ||
|
||
cat <<EOF >$_singularity_file | ||
Bootstrap: docker | ||
From: $_vcell_batch_docker_name | ||
%runscript | ||
exec /vcellscripts/entrypoint.sh "\$@" | ||
%labels | ||
AUTHOR jcschaff | ||
EOF | ||
|
||
echo "" | ||
echo "wrote Singularity file $_singularity_file" | ||
cat $_singularity_file | ||
|
||
# | ||
# build the singularity image and place in singularity-vm directory | ||
# | ||
echo "" | ||
remote_cmd="sudo singularity build /vagrant/$_singularity_image_file /vagrant/$_singularity_file" | ||
echo "vagrant ssh -c \"$remote_cmd\"" | ||
vagrant ssh -c "$remote_cmd" | ||
if [[ $? -ne 0 ]]; then echo "failed to build singularity image from vagrant" && exit 1; fi | ||
|
||
# | ||
# bring down Vagrant Singularity box | ||
# | ||
echo "" | ||
echo "vagrant halt" | ||
vagrant halt | ||
if [[ $? -ne 0 ]]; then echo "failed to stop vagrant box"; fi | ||
|
||
echo "" | ||
echo "created Singularity image for vcell-bash ./$local_singularity_image_name locally (in ./singularity-vm folder), can be pushed to remote server during deploy" | ||
echo "" | ||
echo "cd .." | ||
cd .. | ||
} | ||
|
||
build_opt_singularity() { | ||
if [ "$skip_singularity" == "false" ]; then | ||
if [ -x "$(command -v singularity)" ]; then | ||
build_opt_singularity_direct | ||
if [[ $? -ne 0 ]]; then echo "failed to build opt singularity image using singularity commands"; exit 1; fi | ||
else | ||
# if [ -x "$(command -v vagrant)" ]; then | ||
# build_opt_singularity_vagrant | ||
# if [[ $? -ne 0 ]]; then echo "failed to build opt singularity image using singularity vagrant box"; exit 1; fi | ||
# else | ||
# echo "found neither singularity nor vagrant, cannot build opt singularity image" | ||
echo "singularity not found, cannot build opt singularity image (vagrant build not implemented)" | ||
exit 1 | ||
fi | ||
# fi | ||
echo "singularity not found, cannot build opt singularity image" | ||
exit 1 | ||
fi | ||
fi | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ authors = ["Jim Schaff <[email protected]>"] | |
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "3.9.*" | ||
python = "^3.9" | ||
copasi-basico = "0.40" | ||
python-copasi = "4.37.264" | ||
jupyter = "^1.0.0" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ authors = ["Jim Schaff <[email protected]>"] | |
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "3.9.*" | ||
python = "^3.9" | ||
vtk = "^9.2.6" | ||
thrift = "^0.16.0" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.