Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/feromond/streamlit_startup_script
A script to start up a streamlit server automatically that uses conda and an environment.yaml file. Currently only supporting windows.
https://github.com/feromond/streamlit_startup_script
automation conda rust streamlit windows
Last synced: 13 days ago
JSON representation
A script to start up a streamlit server automatically that uses conda and an environment.yaml file. Currently only supporting windows.
- Host: GitHub
- URL: https://github.com/feromond/streamlit_startup_script
- Owner: Feromond
- Created: 2024-08-26T22:01:20.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T05:18:30.000Z (2 months ago)
- Last Synced: 2024-10-11T09:21:54.191Z (about 1 month ago)
- Topics: automation, conda, rust, streamlit, windows
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Streamlit Startup Script
> **_(Not supporting any other OS besides Windows currently...)_**
This simple script is designed to be run on startup and will automatically startup a streamlit server that uses conda environments.
The config.toml file controls the setup options for the code. To run run things properly the config.toml should sit with the executible in the same directory.
## Script Steps:
- Reads the config file to get information on what files to read
- Changes directory to the streamlit application folder
- Attempts to create the conda environment from the environment file specified.
- If the environment already exists the above step will skip, however then it will attempt to update the environment if there have been any changes to package versions in the environment file vs the stored environment.
- Next the conda environment that was created or updated is activated
- Then the streamlit server is run. It is possible to add arguments if needed to the ending of the entry python file name (eg. "app.py --port 80")## Running the Script on Windows Startup
1. Task Scheduler:
Use Windows Task Scheduler to run your Rust script at startup.
Steps:
1. Open Task Scheduler from the Start Menu.
2. Select “Create Task” from the right panel.
3. Name the task (e.g., “Streamlit Startup Script”).
4. Choose “When the computer starts” as the trigger.
5. Select “Start a Program” as the action.
6. Browse to the compiled Rust executable (.exe) and select it.
7. Make sure to modify the "Start In (optional)" field to be the directory that holds the executable and the config. Logs will also generate here after.
8. Configure the task to run with highest privileges if needed.2. Startup Folder:
Place a shortcut to the Rust executable in the Windows Startup folder.
Steps:
1. Press Win + R and type shell:startup to open the Startup folder.
2. Create a shortcut to your Rust script’s executable in this folder.For both the procedures mentioned above, ensure the config.toml file sits with the actual source executible in the same directory (does not have to be with the shortcut).