Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flatland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sfwatergit
Flatland
Commits
f480b09b
Commit
f480b09b
authored
5 years ago
by
u214892
Browse files
Options
Downloads
Patches
Plain Diff
#71 one-click-installer-runner
parent
719eaff3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
getting_started/run_notebooks.bat
+53
-0
53 additions, 0 deletions
getting_started/run_notebooks.bat
getting_started/run_notebooks.sh
+44
-0
44 additions, 0 deletions
getting_started/run_notebooks.sh
setup.py
+1
-0
1 addition, 0 deletions
setup.py
with
98 additions
and
0 deletions
getting_started/run_notebooks.bat
0 → 100644
+
53
−
0
View file @
f480b09b
@echo
on
set
PWD_BEFORE
=
%cd%
@echo
off
echo
"************ TESTING PREREQUISITES PYTHON3 + GIT *************************"
@echo
on
git
--version
||
goto
:error
python3
--version
||
goto
:error
@echo
off
echo
"************ SETUP VIRTUAL ENVIRONMENT FLATLAND *************************"
@echo
on
set
FLATLAND_BASEDIR
=
%~dp0
\..
set
WORKON_HOME
=
%FLATLAND_BASEDIR%
\getting_started\envs_win
if
not
exist
"
%WORKON_HOME%
"
md
"
%WORKON_HOME%
"
||
goto
:error
cd
"
%WORKON_HOME%
"
rem use venv instead of virtualenv/virtualenv-wrapper because of https://github.com/pypa/virtualenv/issues/355
python3
-m
venv
flatland
||
goto
:error
rem ignore activation error: https://stackoverflow.com/questions/51358202/python-3-7-activate-venv-error-parameter-format-not-correct-65001-windows
call
"
%WORKON_HOME%
\flatland\Scripts\activate.bat"
||
true
@echo
off
echo
"************ INSTALL FLATLAND IN THE VIRTUALENV *************************"
@echo
on
python
-m
pip
install
--upgrade
pip
||
goto
:error
cd
%FLATLAND_BASEDIR%
||
goto
:error
python
setup
.py
install
||
goto
:error
REM ensure jupyter is installed in the virtualenv
pip
install
-r
"
%FLATLAND_BASEDIR%
/requirements_dev.txt"
-r
"
%FLATLAND_BASEDIR%
\requirements_continuous_integration.txt"
||
goto
:error
@echo
off
echo
"************ INSTALL JUPYTER EXTENSION *************************"
@echo
on
jupyter
nbextension
install
--py --sys-prefix
widgetsnbextension
||
goto
:error
jupyter
nbextension
enable
--py --sys-prefix
widgetsnbextension
||
goto
:error
jupyter
nbextension
install
--py --sys-prefix
jpy_canvas
||
goto
:error
jupyter
nbextension
enable
--py --sys-prefix
jpy_canvas
||
goto
:error
jupyter
notebook
||
goto
:error
goto
:EOF
:error
echo
Failed
with
error
#
%errorlevel%
.
cd
"
%PWD_BEFORE%
"
||
true
deactivate
||
true
pause
This diff is collapsed.
Click to expand it.
getting_started/run_notebooks.sh
0 → 100644
+
44
−
0
View file @
f480b09b
#!/usr/bin/env bash
set
-e
# stop on error
set
-x
# echo commands
# https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
FLATLAND_BASEDIR
=
$(
dirname
"
$0
"
)
/..
FLATLAND_BASEDIR
=
$(
realpath
"
$FLATLAND_BASEDIR
"
)
echo
"BASEDIR=
${
FLATLAND_BASEDIR
}
"
set
+x
echo
"************ TESTING PREREQUISITES PYTHON3 + GIT *************************"
set
-x
set
+x
echo
"************ SETUP VIRTUAL ENVIRONMENT FLATLAND *************************"
set
-x
export
WORKON_HOME
=
${
FLATLAND_BASEDIR
}
/getting_started/envs
echo
WORKON_HOME
=
$WORKON_HOME
echo
PWD
=
$PWD
mkdir
-p
${
WORKON_HOME
}
# cannot work with virtualenvwrapper in script
cd
${
WORKON_HOME
}
python3
-m
venv flatland
source
flatland/bin/activate
set
+x
echo
"************ INSTALL FLATLAND IN THE VIRTUALENV *************************"
set
-x
cd
${
FLATLAND_BASEDIR
}
python setup.py
install
# ensure jupyter is installed in the virtualenv
pip
install
-r
${
FLATLAND_BASEDIR
}
/requirements_dev.txt
-r
requirements_continuous_integration.txt
set
+x
echo
"************ INSTALL JUPYTER EXTENSION *************************"
set
-x
jupyter nbextension
install
--py
--sys-prefix
widgetsnbextension
jupyter nbextension
enable
--py
--sys-prefix
widgetsnbextension
jupyter nbextension
install
--py
--sys-prefix
jpy_canvas
jupyter nbextension
enable
--py
--sys-prefix
jpy_canvas
jupyter notebook
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
0
View file @
f480b09b
...
...
@@ -8,6 +8,7 @@ import sys
from
setuptools
import
setup
,
find_packages
assert
sys
.
version_info
>=
(
3
,
6
)
with
open
(
'
README.rst
'
)
as
readme_file
:
readme
=
readme_file
.
read
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment