-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (19 loc) · 807 Bytes
/
Dockerfile
File metadata and controls
23 lines (19 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu:latest AS builder
USER root
WORKDIR /build
ENV FC=gfortran
ARG FVS_VERSION
RUN apt-get update &&\
apt-get install -y git build-essential gfortran cmake unixodbc-dev
RUN git clone -b "${FVS_VERSION}" --recurse-submodules https://github.com/USDAForestService/ForestVegetationSimulator.git
RUN cd /build/ForestVegetationSimulator/bin &&\
make US
FROM python:3.11-slim AS runtime
RUN apt-get update &&\
apt-get install -y git build-essential gfortran cmake unixodbc-dev &&\
pip install --upgrade pip pip-tools &&\
pip install --no-cache-dir --upgrade pytest &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/ForestVegetationSimulator/bin/FVS??.so /usr/local/lib
COPY --from=builder /build/ForestVegetationSimulator/bin/FVS?? /usr/local/bin