Skip to content

Commit 5215268

Browse files
authored
Merge pull request #11 from suaaa7/pycaret_example
Multi stage build
2 parents 2a66062 + ce1e10f commit 5215268

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Docker build for pycaret_example
2+
on: [pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-18.04
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v2
10+
- name: Docker build
11+
run: |
12+
cd pycaret_example
13+
docker build -t pycaret_example .

pycaret_example/Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
FROM python:3.8-buster
1+
FROM python:3.8-buster as builder
22

33
RUN pip install --upgrade pip setuptools \
4-
&& pip install matplotlib jupyter pandas pycaret
4+
&& pip install matplotlib pandas pycaret
55

6-
CMD ["jupyter", "notebook", "--allow-root"]
6+
FROM python:3.8-slim-buster as runner
7+
8+
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
9+
10+
RUN pip install --upgrade pip setuptools \
11+
&& pip install jupyterlab
12+
13+
ENTRYPOINT [ "jupyter-lab" ]
14+
CMD [ "--no-browser", "--allow-root", "--ip=0.0.0.0", "--port=8886", "--notebook-dir=/opt", "--NotebookApp.token=''" ]

pycaret_example/docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.3'
22
services:
33
pycaret:
44
container_name: pycaret_example
5-
image: pycaret_example:0.1.0
5+
image: pycaret_example:0.2.0
66
build: .
77
tty: true
88
stdin_open: true
@@ -11,6 +11,4 @@ services:
1111
- "8886:8886"
1212
volumes:
1313
- ./notebook:/opt/notebook
14-
environment:
15-
- JUPYTER_CONFIG_DIR=/opt/notebook
1614
working_dir: /opt/notebook

pycaret_example/notebook/jupyter_notebook_config.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)