Skip to content

Commit

Permalink
docs: updated Docker installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
danilexn committed Apr 22, 2024
1 parent c49912c commit 04a94b5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
48 changes: 23 additions & 25 deletions docs/computational/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,41 +71,39 @@ pip install -e openst

The official [Docker image] is a great way to get up and running in a few
minutes, as it comes with all dependencies pre-installed. Open up a terminal
and pull the image with:
and pull the image:

``` sh
docker pull rajewsky/openst
```

The `openst` executable is provided as an entry point and `serve` is the
default command.

You can run a terminal for `openst` by running
#### Get a `bash` terminal
In a terminal:
```sh
docker run -it openst
docker run -it --rm --entrypoint bash openst
```

Optionally, you might want to enable X11 redirection to enable GUI support (e.g., for the `openst manual_pairwise_aligner` tool).
Follow these steps:

1. Install X Server on your host machine if not already installed.
2. Allow connections to your X Server by running the following command on your host:
```sh
xhost +
#### Attach a local folder to `docker`:
In a terminal:
```bash
docker run -it --rm -p 9876:9876 -v local_folder:/app/docker_folder openst
```
3. Run the Docker container with the following additional options:
```sh
docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix openst

Make sure to replace `local_folder` (and optionally `docker_folder`).


#### Support GUI (`openst manual_pairwise_aligner` or `napari`)
In a terminal:
```bash
docker run -it --rm -p 9876:9876 openst
```

Now, you can execute PyQt5-based applications, and the GUI will be displayed on your host machine.
Then open [https://localhost:9876](https://localhost:9876) in a browser.
The video below shows an example launching `openst manual_pairwise_aligner` on
the browser (we recommend Google Chrome or similar).

!!! note
- Ensure that the X Server on your host allows connections (xhost +) before running the container,
- Make sure the necessary dependencies are installed on your host machine for PyQt5 applications.
- Remember to close the X Server connections after using the container:
```sh
xhost -
```
<video loop autoplay muted playsinline width="800">
<source src='../../static/video/openst_docker_gui.webm' type="video/webm">
</video>

[Docker image]: https://hub.docker.com/r/rajewsky/openst/
[Docker image]: https://hub.docker.com/r/rajewsky/openst/
Binary file added docs/static/video/openst_docker_gui.webm
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
/* Adjust the margin-left value as needed */
margin-left: -20px;
}

video {
clip-path: inset(1px 1px);
}

0 comments on commit 04a94b5

Please sign in to comment.