Skip to content

Commit

Permalink
added main notebook and updated docker runner
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Feb 21, 2024
1 parent e5ef9fd commit 544e341
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 1 deletion.
102 changes: 102 additions & 0 deletions main.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "initial_id",
"metadata": {
"collapsed": true,
"is_executing": true
},
"outputs": [],
"source": [
"import os \n",
"import smoldyn\n",
"import tellurium as te\n",
"import sed2.core \n",
"from process_bigraph import Composite\n",
"from biosimulator_processes.smoldyn_process import SmoldynProcess"
]
},
{
"cell_type": "code",
"outputs": [],
"source": [
"instance = {\n",
" 'smoldyn': {\n",
" '_type': 'process',\n",
" 'address': 'local:smoldyn',\n",
" 'config': {\n",
" 'model_filepath': 'biosimulator_processes/model_files/minE_model.txt',\n",
" 'animate': False},\n",
" 'inputs': {\n",
" 'species_counts': ['species_counts_store'],\n",
" 'molecules': ['molecules_store']},\n",
" 'outputs': {\n",
" 'species_counts': ['species_counts_store'],\n",
" 'molecules': ['molecules_store']}\n",
" },\n",
" 'emitter': {\n",
" '_type': 'step',\n",
" 'address': 'local:ram-emitter',\n",
" 'config': {\n",
" 'emit': {\n",
" 'species_counts': 'tree[string]',\n",
" 'molecules': 'tree[string]'}\n",
" },\n",
" 'inputs': {\n",
" 'species_counts': ['species_counts_store'],\n",
" 'molecules': ['molecules_store']}\n",
" }\n",
" }"
],
"metadata": {
"collapsed": false
},
"id": "e379ea06228d2046"
},
{
"cell_type": "code",
"outputs": [],
"source": [
"fp = instance.get('smoldyn').get('config').get('model_filepath')\n",
"\n",
"os.path.exists(fp)"
],
"metadata": {
"collapsed": false
},
"id": "54541b0cc32e5940"
},
{
"cell_type": "code",
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
},
"id": "beca4cc35a69b69c"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
2 changes: 1 addition & 1 deletion scripts/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
yes | docker system prune
docker buildx create --name biosimbuilder --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64 -t biosimulator-processes . \
docker buildx build --platform linux/amd64 -t biosimulators/biosimulator-processes:0.0.1 . \
&& docker run --platform linux/amd64 -it -p 8888:8888 biosimulator-processes


Expand Down

0 comments on commit 544e341

Please sign in to comment.