Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev and prod dockerfiles #1

Merged
merged 1 commit into from
Apr 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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