Skip to content

Commit

Permalink
Merge pull request #304 from e-perl-NOAA/main
Browse files Browse the repository at this point in the history
Added some more description/info to quickstarts
  • Loading branch information
johnoel authored Mar 20, 2024
2 parents 4fdc042 + e98ec4b commit 4f93cf7
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 29 deletions.
39 changes: 22 additions & 17 deletions scripts/docker/quickstart-unix.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
QuickStart - Using ADMB Docker Linux Image
QuickStart - Using ADMB Docker Image for Linux
==========================================

*ADMB-13.2*
*Released March 15, 2024*

Details prerequisites and procedures to use the ADMB Docker Linux image for building and running ADMB models with the [simple example](https://github.com/admb-project/admb/tree/main/examples/admb/simple).
Details, prerequisites, and procedures to use the ADMB Docker Image for Linux for building and running ADMB models with the [simple example](https://github.com/admb-project/admb/tree/main/examples/admb/simple).

ADMB Docker Linux Image
ADMB Docker Image for Linux
-----------------------

The ADMB Docker image uses the *Debian 12.1 (Bookwork)* as the base container.
The ADMB Docker Image for Linux uses the *Debian 12.1 (Bookwork)* as the base container.

Below is the list of tools that are preinstalled.

* Compiler - GNU GCC version 13.2
* Compiler - GNU GCC version 13.2
* ADMB - latest version

Prerequisites
-------------

To use ADMB Docker Image for Linux, the operating system of host computer must be either Linux, MacOS or Windows.
To use the ADMB Docker Image for Linux, the operating system of host computer must be either Linux, MacOS or Windows.

* Download and install the [Docker Desktop](https://www.docker.com/products/docker-desktop/).

For MacOS or Windows computers, click the Docker Desktop to run the Docker services on the local host computer.

Alternative to using Docker Desktop - GitHub Codespaces
------------------------------------------------------
If you are a GitHub user and have your model on GitHub, you can take advantage of [GitHub Codespaces](https://github.com/features/codespaces) which start up an Ubuntu Linux dev environment from your repository in your browser with VSCode as the default editor and already has Docker installed and you can use Docker through the terminal commands (see below under Downloads and Usage). Windows and macOS are not supported on Codespaces.

You can customize the [Codespace startup configuration](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers) by creating a .devcontainer/devcontainer.json file (instructions in the Codespace startup configuration link). The customizations include adding R and R packages upon startup, adding VSCode extensions, changing the image from which the Codespace is built, and much more.

You get up to 60 hours per month for free on Codespaces, after which you will be prompted to pay in order to continue using Codespaces. Generally, 60 hours is plenty of time, though if you need time beyond this, the pricing is pretty affordable.


Downloads
---------

Using the Docker Desktop, download the [ADMB Docker Image](https://hub.docker.com/r/johnoel/admb/) or use the command below from the terminal.
Using the Docker Desktop, download the [ADMB Docker Image](https://hub.docker.com/r/johnoel/admb/) by typing "admb-13.2" in the Docker Desktop search bar or use the command below from the terminal.

docker pull johnoel/admb-13.2:linux

For MacOS with ARM64 CPU host computers, download the docker image with the command below.

docker pull johnoel/admb-13.2:linux-arm64

Usage
-----

1. Open a Terminal (or Command Prompt for Windows) and change to the model local directory.
1. Open a Terminal (or Command Prompt for Windows) and change to the model local directory. In this example we will be navigating to the simple directory under examples/admb/simple.

cd simple
cd examples/admb/simple

2. Builds simple.tpl into a Linux executable using the ADMB Docker Linux Image and the mounted current local directory.
2. Builds simple.tpl into a Linux executable using the ADMB Docker Image for Linux and the mounted current local directory.

For Windows host,

Expand All @@ -57,7 +62,7 @@ Usage

4. Run **simple** Linux executable.

The Linux executable is incompatible for MacOS and Windows platforms, but the Docker Linux Image can be used to run the program. See the Docker commands below.
The Linux executable is incompatible for MacOS and Windows platforms, but the ADMB Docker Image for Linux can be used to run the program. See the Docker commands below.

For Windows host,

Expand All @@ -76,7 +81,7 @@ Console

The procedure below shows how to use the container's interactive command line shell to build and run models.

1. Use docker to open container's interactive shell and mount current local directory to the container.
1. Use Docker to open container's interactive shell and mount current local directory to the container.

For Windows host,

Expand Down Expand Up @@ -127,6 +132,6 @@ Help
Below are links to documentation and online support for ADMB and Docker.

* [ADMB Manuals](https://www.admb-project.org/docs/manuals/)
* [ADMB Discussions(Support)](https://github.com/admb-project/admb/discussions)
* [ADMB Discussions (Support)](https://github.com/admb-project/admb/discussions)
* [Docker Documentation](https://docs.docker.com/)
* [Introduction to Containers and Docker](https://learn.microsoft.com/en-us/dotnet/architecture/microservices/container-docker-introduction/)
26 changes: 14 additions & 12 deletions scripts/docker/quickstart-windows.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
QuickStart - Using ADMB Docker Windows Image
QuickStart - Using ADMB Docker Image for Windows
============================================

*ADMB-13.2*
*Released March 15, 2024*

Details prerequisites and procedures to use the ADMB Docker Windows image for building and running ADMB models with the [simple example](https://github.com/admb-project/admb/tree/main/examples/admb/simple)
Details prerequisites and procedures to use the ADMB Docker Image for Windows for building and running ADMB models with the [simple example](https://github.com/admb-project/admb/tree/main/examples/admb/simple)

ADMB Docker Windows Image
ADMB Docker Image for Windows
-------------------------

The ADMB Docker Windows image uses the *Windows LTSC 2022 or 2019* as the base container.
The ADMB Docker Image for Windows uses the *Windows LTSC 2022 or 2019* as the base container.

Below is the list of tools that are preinstalled.

Expand All @@ -19,16 +19,18 @@ Below is the list of tools that are preinstalled.
Prerequisites
-------------

The Windows operating system is needed on the host computer to use the ADMB Docker Windows Image.
The Windows operating system is needed on the host computer to use the ADMB Docker Image for Windows.

* Download and install the [Docker Desktop](https://www.docker.com/products/docker-desktop/) for Windows.

After the installing Docker Desktop, double click the the Docker Desktop to run services, then set the Docker type to Windows Containers (read [documentation](https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#install-the-container-runtime)).
After the installing Docker Desktop, double click the the Docker Desktop to run services, then set the Docker type to Windows Containers (read [documentation](https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#install-the-container-runtime)). The image below is a screenshot of where to go to switch to from Linux to Windows containers.

[<img src="windows_docker_image.png" alt="Screenshot of switching to Windows containers" width="40%"/>](windows_docker_image.png)

Downloads
---------

Using the Docker Desktop, pull the [ADMB Docker Image](https://hub.docker.com/r/johnoel/admb/) or use the command below in the command prompt to download ADMB Docker Windows image. The image uses *Windows 2022 LTSC* as the base container.
Using the Docker Desktop, pull the [ADMB Docker Image](https://hub.docker.com/r/johnoel/admb/) or use the command below in the command prompt to download ADMB Docker Image for Windows. The image uses *Windows 2022 LTSC* as the base container.

docker pull johnoel/admb-13.2:windows

Expand All @@ -39,11 +41,11 @@ For Windows 10 users, use the docker image in the procedures below. The image u
Usage
-----

1. Open Command Prompt and change to the model local directory.
1. Open Command Prompt and change to the model local directory. In this example we will be navigating to the simple directory under examples\admb\simple.

cd C:\simple
cd C:\examples\admb\simple

2. Build simple.tpl into an Windows executable using the ADMB Docker Image and the mounted current local directory.
2. Build simple.tpl into an Windows executable using the ADMB Docker Image for Windows and the mounted current local directory.

docker run --env LDFLAGS=-static --rm --volume %CD%:C:\simple --workdir C:\simple johnoel/admb-13.2:windows simple.tpl

Expand All @@ -64,7 +66,7 @@ Console

The procedure below shows how to use the interactive command line shell to build and run models.

1. Use docker to open container's interactive shell and mount current local directory to the container.
1. Use Docker to open container's interactive shell and mount current local directory to the container.

docker run -it --entrypoint cmd --rm --volume %CD%:C:\simple --workdir C:\simple johnoel/admb-13.2:windows

Expand Down Expand Up @@ -109,6 +111,6 @@ Help
Below are links to documentation and online support for ADMB and Docker.

* [ADMB Manuals](https://www.admb-project.org/docs/manuals/)
* [ADMB Discussions(Support)](https://github.com/admb-project/admb/discussions)
* [ADMB Discussions (Support)](https://github.com/admb-project/admb/discussions)
* [Docker Documentation](https://docs.docker.com/)
* [Introduction to Containers and Docker](https://learn.microsoft.com/en-us/dotnet/architecture/microservices/container-docker-introduction/)
Binary file added scripts/docker/windows_docker_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4f93cf7

Please sign in to comment.