Skip to content
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,103 @@ This repository contains a template app for OpenMS workflows in a web applicatio
- framework for workflows with OpenMS TOPP tools
- Deployment [with docker-compose](https://github.com/OpenMS/streamlit-deployment)

## 🔗 Try the Online Demo

Explore the hosted version here: 👉 [Live App](https://abi-services.cs.uni-tuebingen.de/streamlit-template/)

## 💻 Run Locally

To run the app locally:

1. **Clone the repository**
```bash
git clone https://github.com/OpenMS/streamlit-template.git
cd streamlit-template
```

2. **Install dependencies**

Make sure you can run ```pip``` commands.

Install all dependencies with:
```bash
pip install -r requirements.txt
```

4. **Launch the app**
```bash
streamlit run app.py
```

> ⚠️ Note: The local version offers limited functionality. Features that depend on OpenMS are only available in the Docker setup.


## 🐳 Build with Docker

1. **Install Docker**

Install Docker from the [official Docker installation guide](https://docs.docker.com/engine/install/)

<details>
<summary>Click to expand</summary>

```bash
# Remove older Docker versions (if any)
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove -y $pkg; done
```

</details>

2. **Test Docker**

Verify that Docker is working.
```bash
docker run hello-world
```
When running this command, you should see a hello world message from Docker.

3. **Clone the repository**
```bash
git clone https://github.com/OpenMS/streamlit-template.git
cd streamlit-template
```

4. **Specify GitHub token (to download Windows executables).**

Create a temporary `.env` file with your Github token.

It should contain only one line:
`GITHUB_TOKEN=<your-github-token>`

ℹ️ **Note:** This step is not strictly required, but skipping it will remove the option to download executables from the WebApp.

3. **Build & Launch the App**

To build and start the containers.
From the project root directory:

```bash
docker-compose up -d --build
```
At the end, you should see this:
```
[+] Running 2/2
✔ openms-streamlit-template Built
✔ Container openms-streamlit-template Started
```

To make sure server started successfully, run `docker compose ps`. You should see `UP´ status':
```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4abe0603e521 openms_streamlit_template "/app/entrypoint.sh …" 7 minutes ago Up 7 minutes 0.0.0.0:8501->8501/tcp, :::8501->8501/tcp openms-streamlit-template
```

To map the port to default streamlit port `8501´ and launch.

```
docker run -p 8505:8501 openms_streamlit_template
```

## Documentation

Documentation for **users** and **developers** is included as pages in [this template app](https://abi-services.cs.uni-tuebingen.de/streamlit-template/), indicated by the 📖 icon.
Expand Down
Loading