Skip to content

Commit

Permalink
Merge pull request #1 from GeoML-SIG/docker
Browse files Browse the repository at this point in the history
dev and prod dockerfiles
  • Loading branch information
tasansal authored Apr 17, 2022
2 parents 64cc8d6 + 73c15ae commit 3579fae
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docker/debian-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ARG NAME=wildcatter
ARG TAG=dev
ARG VIRTUAL_ENV=/opt/venv

FROM python:3.9-slim-bullseye as builder
ARG VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apt-get update
RUN apt-get install -y \
swig \
build-essential

RUN python -m venv $VIRTUAL_ENV
RUN pip -q install pip --upgrade
RUN pip install \
numpy \
matplotlib \
jupyterlab

COPY . wildcatter
WORKDIR /wildcatter
RUN pip install .

FROM python:3.9-slim-bullseye
ARG VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY --from=builder $VIRTUAL_ENV $VIRTUAL_ENV
36 changes: 36 additions & 0 deletions docker/debian.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ARG NAME=wildcatter
ARG TAG=prod
ARG PORT="8888"
ARG VIRTUAL_ENV=/opt/venv

FROM python:3.9-slim-bullseye as builder
ARG VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apt-get update
RUN apt-get install -y \
swig \
build-essential

RUN python -m venv $VIRTUAL_ENV
RUN pip -q install pip --upgrade
RUN pip install \
numpy \
matplotlib \
jupyterlab

COPY . wildcatter
WORKDIR /wildcatter
RUN pip install .

FROM python:3.9-slim-bullseye
ARG PORT
ARG VIRTUAL_ENV

ENV PORT=$PORT
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

COPY --from=builder $VIRTUAL_ENV $VIRTUAL_ENV

EXPOSE $PdORT
ENTRYPOINT jupyter lab --port=$PORT --ip=0.0.0.0 --allow-root --no-browser

0 comments on commit 3579fae

Please sign in to comment.