-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from GeoML-SIG/docker
dev and prod dockerfiles
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |