deploy: singularity netcdf dependency

This commit is contained in:
Jonas Juselius
2022-09-16 18:39:59 +02:00
parent e049714fae
commit 26bc6972e3
3 changed files with 51 additions and 4 deletions

View File

@@ -11,11 +11,11 @@ let srcPath = Path.getFullName "src"
let testPath = Path.getFullName "test"
let libPath = None
let deployPath = Path.getFullName "deploy"
let distPath = Path.getFullName "dist"
let packPath = Path.getFullName "packages"
let versionFile = Path.getFullName ".version"
Target.create "Clean" (fun _ -> Shell.cleanDir deployPath)
Target.create "Clean" (fun _ -> Shell.cleanDir distPath)
Target.create "InstallClient" (fun _ ->
run npm "install" "."
@@ -23,11 +23,11 @@ Target.create "InstallClient" (fun _ ->
)
Target.create "Bundle" (fun _ ->
run dotnet $"publish -c Release -o \"{deployPath}\"" srcPath
run dotnet $"publish -c Release -o \"{distPath}\"" srcPath
)
Target.create "BundleDebug" (fun _ ->
run dotnet $"publish -c Debug -o \"{deployPath}\"" srcPath
run dotnet $"publish -c Debug -o \"{distPath}\"" srcPath
)
Target.create "Pack" (fun _ ->

1
.gitignore vendored
View File

@@ -15,3 +15,4 @@ deploy
.ionide/
*.db
build.fsx.lock
*.sif

46
batman.def Normal file
View File

@@ -0,0 +1,46 @@
Bootstrap: docker
From: mcr.microsoft.com/dotnet/sdk:6.0
Stage: build
%files
. /build
~/.nuget/NuGet/NuGet.Config /build/NuGet.Config
%post
curl -sL https://deb.nodesource.com/setup_16.x | bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" \
| tee /etc/apt/sources.list.d/yarn.list
# Install node, 7zip, yarn, git, process tools
apt update \
&& apt install -y nodejs p7zip-full git procps ssh-client
# Clean up
apt autoremove -y \
&& apt clean -y \
&& rm -rf /var/lib/apt/lists/*
# Install dotnet tools
dotnet tool install fable -g
cd /build
dotnet run bundle
Bootstrap: docker
From: mcr.microsoft.com/dotnet/runtime:6.0
Stage: runtime
%files from build
/build/dist /app
%post
apt update \
&& apt install -y libnetcdf-dev
apt autoremove -y \
&& apt clean -y \
&& rm -rf /var/lib/apt/lists/*
%runscript
exec /app/Batman "$@"