Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c377e54
renamed cupcake -> carrotcake
derpycode Apr 15, 2024
4860f46
resolved minor bug in SConstruct
pthak006 Apr 16, 2024
5478c11
reverted debugging logs
pthak006 Apr 16, 2024
7d2b0ac
added the file for restapi endpoint, modified code of read_ctoaster_c…
Jun 14, 2024
460d842
added the rest api endpoint for status panel information
pthak006 Jul 22, 2024
7dc2431
resolved one of the review comments
pthak006 Aug 8, 2024
7663682
resolved review comments
pthak006 Aug 8, 2024
d38d643
did changes for the status panel
pthak006 Aug 13, 2024
c4841c8
Merge pull request #1 from genie-model/containerization-1
pthak006 Aug 15, 2024
0d529a6
ctoaster linux setup changes
ravitheja990 Aug 22, 2024
7906756
CORS url reverted to localhost
ravitheja990 Aug 30, 2024
5a92cd1
Merge pull request #2 from genie-model/ctoaster_cloud_dev_setup
pthak006 Sep 2, 2024
f567216
Merge branch 'main' into containerization-1
pthak006 Sep 2, 2024
13342d2
removed need for module genie_global in gem_utils.f90
derpycode Sep 5, 2024
56f8fe2
Merge pull request #3 from genie-model/containerization-1
pthak006 Sep 17, 2024
2aedd19
namelist apis added
ravitheja990 Sep 17, 2024
3ee7134
added REST endpoints corresponding to run job and get streaming outpu…
pthak006 Sep 17, 2024
119528f
Merge branch 'main' into containerization-1
pthak006 Sep 17, 2024
759b5f3
added code related to pause job, changes required
pthak006 Sep 18, 2024
bf28f89
resolved the logging error happening during puase-resume
pthak006 Sep 23, 2024
445ac55
added restart from capability in the UI
pthak006 Sep 23, 2024
a7e6c21
changes corresponding to removing run-segment and T-100 option
pthak006 Sep 23, 2024
d4fb486
removed unnecessary blocks from the add job, rewrote the two namelist…
pthak006 Sep 30, 2024
e83354b
plot apis for data file list, variable list and plot data added
ravitheja990 Oct 10, 2024
88a8d67
Merge pull request #4 from genie-model/namelist_api
pthak006 Oct 12, 2024
2c24825
merged changes from main after merging namelist branch into main
pthak006 Oct 12, 2024
54fba34
Merge pull request #5 from genie-model/containerization-1
pthak006 Oct 12, 2024
0a5b720
SYS PLATFORM name case correction
ravitheja990 Oct 14, 2024
969bafc
plot apis updated with dynamic path retrieval logic
ravitheja990 Oct 14, 2024
7d75a05
api for stream functionality added for plot data
ravitheja990 Oct 24, 2024
d84bd2e
MODELS job excluded from UI and plot stream api updated
ravitheja990 Oct 31, 2024
bbf5e90
branch merge conflicts resolved with main
ravitheja990 Nov 29, 2024
c6794da
branch merge conflicts resolved with main
ravitheja990 Nov 29, 2024
bba6502
branch merge issue resolved
ravitheja990 Dec 5, 2024
8e7ed72
containerization of ctoaster: version 1
ravitheja990 Jan 27, 2025
3389b26
README improved
ravitheja990 Jan 28, 2025
d4e7975
Dockerfile updated to resolve the setup job issue in the docker conta…
ravitheja990 Feb 2, 2025
d7046ba
Dockerfile with netcdf issues resolved and working version of cupcake
ravitheja990 Feb 11, 2025
16838d5
deployment and service files added for kubernetes orchestration for c…
ravitheja990 Feb 26, 2025
f2eb2cc
README updated with backend kubernetes orchestration instructions
ravitheja990 Feb 27, 2025
9f784e3
README updated
ravitheja990 Feb 27, 2025
0e4b737
horizontal pod autoscaler added and its documentation updated in README
ravitheja990 Mar 24, 2025
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
105 changes: 74 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,86 @@
# Use a multi-stage build to create a platform-independent image
FROM --platform=$BUILDPLATFORM continuumio/miniconda3:latest AS build
# Use a lightweight Python image
FROM python:3.10-slim

# Set build arguments
ARG TARGETPLATFORM
ARG BUILDPLATFORM
# Set environment variables to avoid Python buffering
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1

# Install necessary build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*

# Create and activate the conda environment
RUN conda create --name myproject python=3.8 -y
SHELL ["conda", "run", "-n", "myproject", "/bin/bash", "-c"]
# Set the working directory in the container
WORKDIR /ctoaster.carrotcake

# Install netcdf-fortran using apt-get
RUN apt-get update && apt-get install -y --no-install-recommends \
# Install required system packages and dependencies for netCDF installation
RUN apt-get update && apt-get install -y \
git \
net-tools \
wget \
libnetcdf-dev \
libnetcdff-dev \
&& rm -rf /var/lib/apt/lists/*
gfortran \
build-essential \
m4 \
libxml2-dev \
libcurl4-openssl-dev \
libhdf5-dev \
zlib1g-dev \
unzip \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Download and install netCDF C libraries
RUN wget https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz \
&& tar -xvzf netcdf-c-4.9.2.tar.gz \
&& cd netcdf-c-4.9.2 \
&& export LDFLAGS="-L/usr/lib/x86_64-linux-gnu/hdf5/serial/lib" \
&& export CFLAGS="-I/usr/lib/x86_64-linux-gnu/hdf5/serial/include" \
&& ./configure \
&& make -j$(nproc) \
&& make check \
&& make install \
&& cd .. && rm -rf netcdf-c-4.9.2 netcdf-c-4.9.2.tar.gz

# Download and install netCDF Fortran libraries
RUN wget https://downloads.unidata.ucar.edu/netcdf-fortran/4.6.1/netcdf-fortran-4.6.1.tar.gz \
&& tar -xvzf netcdf-fortran-4.6.1.tar.gz \
&& cd netcdf-fortran-4.6.1 \
&& ./configure \
&& make -j$(nproc) \
&& make check \
&& make install \
&& cd .. && rm -rf netcdf-fortran-4.6.1 netcdf-fortran-4.6.1.tar.gz

# Run ldconfig to update library links
RUN ldconfig

# Copy the entire project
COPY . /ctoaster.carrotcake

# Copy the MODELS folder
COPY MODELS /ctoaster.carrotcake-jobs/MODELS

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Install scons and matplotlib using pip
RUN pip install --no-cache-dir scons matplotlib
# Create required directories
RUN mkdir -p /ctoaster.carrotcake-data \
&& mkdir -p /ctoaster.carrotcake-test \
&& mkdir -p /ctoaster.carrotcake-jobs

# Clone the ctoaster.cupcake repository
RUN git clone https://github.com/derpycode/ctoaster.cupcake.git
WORKDIR /ctoaster.cupcake
# Clone the required repositories
RUN git clone https://github.com/genie-model/ctoaster-data /ctoaster.carrotcake-data \
&& git clone https://github.com/genie-model/ctoaster-test /ctoaster.carrotcake-test

# Create the final image
FROM continuumio/miniconda3:latest
# Create the hidden .ctoasterrc file with the configuration
RUN echo "ctoaster_root: /ctoaster.carrotcake\nctoaster_data: /ctoaster.carrotcake-data\nctoaster_test: /ctoaster.carrotcake-test\nctoaster_jobs: /ctoaster.carrotcake-jobs\nctoaster_version: DEVELOPMENT" > /root/.ctoasterrc

# Copy the conda environment from the build stage
COPY --from=build /opt/conda/envs/myproject /opt/conda/envs/myproject
# Make necessary scripts executable
RUN chmod +x /ctoaster.carrotcake/setup-ctoaster /ctoaster.carrotcake/run-carrotcake /ctoaster.carrotcake/tests

# Activate the conda environment
SHELL ["conda", "run", "-n", "myproject", "/bin/bash", "-c"]
# Set up SCons and build the project
RUN pip install scons
# \
# && scons -C /ctoaster.carrotcake-jobs/MODELS/DEVELOPMENT/LINUX/ship

# Copy the project files
COPY --from=build /ctoaster.cupcake /ctoaster.cupcake
WORKDIR /ctoaster.cupcake
# Expose the port for the FastAPI server
EXPOSE 8000

# Set any necessary environment variables
# Command to run the FastAPI server
CMD ["uvicorn", "tools.REST:app", "--host", "0.0.0.0", "--port", "8000"]
43 changes: 43 additions & 0 deletions Dockerfile_backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Use a multi-stage build to create a platform-independent image
FROM --platform=$BUILDPLATFORM continuumio/miniconda3:latest AS build

# Set build arguments
ARG TARGETPLATFORM
ARG BUILDPLATFORM

# Install necessary build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*

# Create and activate the conda environment
RUN conda create --name myproject python=3.8 -y
SHELL ["conda", "run", "-n", "myproject", "/bin/bash", "-c"]

# Install netcdf-fortran using apt-get
RUN apt-get update && apt-get install -y --no-install-recommends \
libnetcdf-dev \
libnetcdff-dev \
&& rm -rf /var/lib/apt/lists/*

# Install scons and matplotlib using pip
RUN pip install --no-cache-dir scons matplotlib

# Clone the ctoaster.carrotcake repository
RUN git clone https://github.com/derpycode/ctoaster.carrotcake.git
WORKDIR /ctoaster.carrotcake

# Create the final image
FROM continuumio/miniconda3:latest

# Copy the conda environment from the build stage
COPY --from=build /opt/conda/envs/myproject /opt/conda/envs/myproject

# Activate the conda environment
SHELL ["conda", "run", "-n", "myproject", "/bin/bash", "-c"]

# Copy the project files
COPY --from=build /ctoaster.carrotcake /ctoaster.carrotcake
WORKDIR /ctoaster.carrotcake

# Set any necessary environment variables
Loading