Skip to content

In-Built Base Stacks

This document provides an overview of the currently available built-in base stacks on the platform. These stacks define the software environment used to execute routines. Users can select a base stack when creating a routine, and the platform handles environment setup using pre-configured container images.


📦 Available Base Stacks

1. PYTHON3_7

Description: Python 3.7 environment with dependency installation support via requirements.txt.

Software Environment:

  • Python 3.7
  • pip (Python package manager)
  • Custom packages defined by user in requirements.txt

Expected Files in Project:

  • requirements.txt must be placed in the root of the project folder

Working Directory in Container: /code

Dockerfile Reference:

dockerfile
# This inbuilt stack expects requirements.txt file to be present in root folder

FROM python:3.7

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

RUN pip install -r /code/requirements.txt

COPY . .

CMD echo "This is default command output of predefined stack named PYTHON3_7"

2. R4_4

Description: R 4.4 environment suitable for statistical scripts and R-based models.

Software Environment:

  • R version 4.4 (via Rocker image)
  • System dependencies:
    • libcurl4-openssl-dev
    • libssl-dev
    • libxml2-dev
    • pandoc
    • git
  • Additional R packages installed via init.R

Expected Files in Project:

  • init.R must be placed in the root of the project folder

Working Directory in Container: /code

Dockerfile Reference:

dockerfile
# Use the official R 4.4 image from Rocker
FROM rocker/r-ver:4.4

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive

# Install necessary system dependencies
RUN apt-get update && apt-get install -y \
    libcurl4-openssl-dev \
    libssl-dev \
    libxml2-dev \
    pandoc \
    git \
    && rm -rf /var/lib/apt/lists/*

# Set working directory to /code
WORKDIR /code

COPY ./init.R /code/init.R

RUN Rscript /code/init.R;

# Copy the local files into the container
COPY . /code

# Default command: start an interactive R session
CMD ["R"]

2. GAMS40_1__R4_0

Description: R 4.4 environment suitable for statistical scripts and R-based models.

Software Environment:

  • GAMS v40.1
  • R version v4.0 (via Rocker image)
  • System dependencies:
    • libcurl4-openssl-dev
    • libssl-dev
    • libxml2-dev
    • pandoc
    • git
  • Additional R packages installed via init.R

Expected Files in Project:

  • init.R must be placed in the root of the project folder

Working Directory in Container: /code

Dockerfile Reference:

dockerfile
# Use the official R 4.4 image from Rocker
FROM debian:bullseye-slim

RUN apt-get update && \
    apt-get install -y curl gnupg2 && \
    rm -rf /var/lib/apt/lists/*


RUN apt-get update && \
    apt-get install -y r-base && \
    rm -rf /var/lib/apt/lists/*


ENV LATEST=40.1.1
ENV LATEST_SHORT=40.1
ENV GAMS_VERSION=${LATEST}
ENV GAMS_BIT_ARC=x64_64

RUN mkdir -p /opt/gams

RUN curl -SL "https://d37drm4t2jghv5.cloudfront.net/distributions/${LATEST}/linux/linux_${GAMS_BIT_ARC}_sfx.exe" \
    --create-dirs -o /opt/gams/gams.exe

WORKDIR /opt/gams
RUN chmod +x gams.exe && \
    ./gams.exe && \
    rm -rf gams.exe

ENV GAMS_PATH=/opt/gams/gams${LATEST_SHORT}_linux_${GAMS_BIT_ARC}_sfx
ENV PATH=$PATH:$GAMS_PATH
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$GAMS_PATH

WORKDIR /code

COPY ./init.R /code/init.R

RUN Rscript /code/init.R;

COPY . /code

CMD ["R"]

🧠 Notes on Usage

  • When using these base stacks, your project folder will be mounted at /code inside the container.
  • These stacks are optimized for common use cases and help users get started quickly without building custom container images.