Environment requirement We recommend mamba instead of conda (It runs faster).
python==3.9.13 bokeh==2.4.3 streamlit==1.11.1 altair==4.2.3
- For install, use this command:
mamba install -y -c conda-forge
- For example:
mamba install -y -c conda-forge python streamlit bokeh=2.4.3 hvplot dask
- I successfully move folders and run in different user by installing those environments, but you may install packages other than those below, depending on your environment. Check all the packages version in my environment:
/home/gops/web/cmip/myenv
.- I am using
<my user name>@imaginator
instead ofsudo -u gops -i
forgops@imaginator
. Justcd /home/gops/web/cmip/
on your account because gops may not let you usesudo
to change settings.- Activete my environment:
/home/gops/web/cmip source myenv/bin/activate
and check packages versions if you still run into an error.
How to run in different user(example: gops instead of your original imaginator)
- Create virtual environment which meets all the environment requirements above.
- move the folder to your direcotry from the gops user:
/home/gops/web/cmip/just_test
Also, you can see exact same file on my original imaginator direcotry:/home/msuzuki/cmipf_rad2/cmipf_rad/
How to run the code locally for testing
- For SSEC computer:
streamlit run frontend1.py --server.port 1234
- For your personal computer:
streamlit run frontend1.py --server.port 1234 --server.address 127.0.0.1
How to run the code using SSEC host
STREAMLIT_SERVER_PORT=41866 streamlit run frontend1.py Before running with SSEC host, you may check if there exists a screen running already by using the command “
screen -r.
” If you want to stop the specific server, for example, 31779, you can type “screen -r 31779. server
”, then ctrl C. Then you may rerun.
To make the website keep running even after the servedown:
Install
chmod (GNU coreutils) 8.30
first
echo "STREAMLIT_SERVER_PORT=41866 streamlit run frontend1.py --server.port=41866" > run_streamlit.sh
chmod +x run_streamlit.sh
pm2 start run_streamlit.sh --name myapp
You can double check if they automatically rerun the webpage by killing the port.
Need help?
- Contact: Marin Suzuki (UW-Madison Alumni & SSEC alumni: 2024 spring)
- Email: purin0514marinn@gmail.com
Project Overview
Website link: https://cimss.ssec.wisc.edu/goes-r/abi-/cmip_stats/
File Overview
-
backend5.py
: data generation(read data, calculate statistics)
frotnend1.py
: for everything else(visualization, website, button. The current website might use saved_frontend1.py which includes saved function. check the sh file.):./streamlit/config.toml
: for changing the theme(color, words size etc)
Example plain HTML site using GitLab Pages.
Learn more about GitLab Pages at https://pages.gitlab.io and the official documentation https://docs.gitlab.com/ce/user/project/pages/.
Table of Contents generated with DocToc
GitLab CI
This project's static Pages are built by GitLab CI, following the steps
defined in .gitlab-ci.yml
:
image: alpine:latest
pages:
stage: deploy
script:
- echo 'Nothing to do...'
artifacts:
paths:
- public
only:
- master
The above example expects to put all your HTML files in the public/
directory.
GitLab User or Group Pages
To use this project as your user/group website, you will need one additional
step: just rename your project to namespace.gitlab.io
, where namespace
is
your username
or groupname
. This can be done by navigating to your
project's Settings.
Read more about user/group Pages and project Pages.
Did you fork this project?
If you forked this project for your own use, please go to your project's Settings and remove the forking relationship, which won't be necessary unless you want to contribute back to the upstream project.
Troubleshooting
- CSS is missing! That means that you have wrongly set up the CSS URL in your HTML files. Have a look at the index.html for an example.