Skip to content

Commit

Permalink
AI generated apptainer definition for oddpub
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlawrimore committed Feb 11, 2025
1 parent 130f9f6 commit 2274c63
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions services/oddpub/oddpub.sif
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Bootstrap: docker
From: condaforge/mambaforge:24.3.0-0

%files
environment.yaml /app/environment.yaml
app.py /app/app.py
_entrypoint.sh /usr/local/bin/_entrypoint.sh

%post
# Set up shell and working directory
mkdir -p /app
cd /app

# Install system dependencies
apt-get update && apt-get install -y poppler-utils

# Set up conda environment
source /opt/conda/etc/profile.d/conda.sh
conda env create -f environment.yaml

# Add conda environment activation to various shell startup files
echo "source /opt/conda/etc/profile.d/conda.sh && conda activate osm" | tee -a ~/.bashrc /etc/profile /etc/profile.d/conda.sh /etc/skel/.bashrc /etc/skel/.profile > /dev/null

# Install oddpub from GitHub
R -e 'devtools::install_github("quest-bih/oddpub",ref="c5b091c7e82ed6177192dc380a515b3dc6304863")'

# Make entrypoint script executable
chmod +x /usr/local/bin/_entrypoint.sh

%environment
export PATH=/opt/conda/bin:$PATH
export SHELL=/bin/bash

%startscript
exec /usr/local/bin/_entrypoint.sh fastapi dev --host 0.0.0.0 --port 8071

%runscript
exec /usr/local/bin/_entrypoint.sh "$@"

0 comments on commit 2274c63

Please sign in to comment.