Usage
There are multiple ways to use the package, depending on your specific requirements and environment. This section outlines the various options available.
Index
Using Julia REPL
This is the simplest way to run the package, however it is the one that requires the most interaction.
Prerequisites
Before getting started, make sure you have the following prerequisites installed on your machine:
julia >= 1.6.1
Run the service
using ModelSelectionGUI
load_envvars(".env") # optional
start()
Using bin/server
command
Using the bin/server command is a convenient way to run the package as a server directly from your command line interface. However, it is necessary to download the source code of the package from the repository.
Prerequisites
Before getting started, make sure you have the following prerequisites installed on your machine:
julia >= 1.6.1
- git: Optional for Option 3.
Download the source code
Option 1: Microsoft Windows
$ Invoke-WebRequest -Uri "https://github.com/ParallelGSReg/ModelSelectionGUI.jl/archive/refs/heads/main.zip" -OutFile "ModelSelectionGUI.jl-main.zip"
$ Compress-Archive -LiteralPath 'ModelSelectionGUI.jl-main.zip' -DestinationPath 'ModelSelectionGUI.jl-main'
$ cd ModelSelection.jl-main
Option 2: GNU/Linux
$ wget --no-check-certificate --content-disposition https://github.com/ParallelGSReg/ModelSelectionGUI.jl/archive/refs/heads/main.zip
$ unzip ModelSelectionGUI.jl-main.zip
$ cd ModelSelection.jl-main
Option 3: Using Git
$ git clone https://github.com/ParallelGSReg/ModelSelectionGUI.jl.git
$ cd ModelSelection.jl
Run the service
Once you have the source files, you can use the command to start the application.
Open a terminal or command prompt.
Navigate to the directory where the source code is located.
Run the following command to start the application:
Option 1: Microsoft Windows
$ bin/server.bat
Option 2: GNU/Linux
$ bin/server
Option 3: macOS
$ bin/server
Using Docker
Docker allows you to use the package in a container, ensuring consistency and portability across different environments without the need to install Julia or any dependencies on your local machine.
In this method, the open_client
and open_documentation
options for opening windows at startup are disabled. So you must enter those pages through the browser.
Prerequisites
Before getting started, make sure you have the following prerequisites installed on your machine:
- Docker: Ensure Docker is installed and running.
Run the service
docker run -d -p <host-port>:8000 --name <container-name> ghcr.io/parallelgsreg/modelselectiongui.jl:latest
Replace <host-port>
with the port on your host machine where you want to access the application, <container-name>
with a name for your container (e.g., model-selection-gui-container
).
Once the container is running, you should be able to access your backend application by visiting http://localhost:<host-port>
in your web browser.
Using Docker Compose
Docker Compose is a tool for running multi-container Docker applications. With Docker Compose, you can simplify the execution of the application without the need to install Julia or any dependencies on your local machine with only one simple command.
In this method, the open_client
and open_documentation
options for opening windows at startup are disabled. So you must enter those pages through the browser.
Prerequisites
Before getting started, make sure you have the following prerequisites installed on your machine:
- Docker: Ensure Docker is installed and running.
- Docker Compose: Install Docker Compose according to your operating system.
Setup
Download the
docker-compose.yaml
file from the package repository: compose.yamlOr create the file using the following structure:
version: '3'
services:
modelselectiongui:
image: ghcr.io/parallelgsreg/modelselectiongui.jl:latest
ports:
- 8000:8000
Replace <host-port>
with the port on your host machine where you want to access the application.
version: '3'
...
ports:
- <host-port>:8000
2. Run the application
Once you have the Docker Compose file, you can use the docker-compose up
command to start the application.
Open a terminal or command prompt.
Navigate to the directory where the
compose.yml
file is located.Run the following command to start the application:
docker-compose up