Add keras, a little cleanup, and dark mode by default

This commit is contained in:
Erik Stambaugh 2024-02-20 14:19:55 -08:00
parent 388e0fa8be
commit e274ab10ed
5 changed files with 53 additions and 22 deletions

View file

@ -7,7 +7,7 @@ up: run
run: build
docker compose up
build: docker-compose.yaml jupyterlab.Dockerfile
build: docker-compose.yaml jupyter/Dockerfile
docker compose build
down:

View file

@ -5,11 +5,22 @@ services:
container_name: jupyter
build:
context: .
dockerfile: jupyterlab.Dockerfile
dockerfile: jupyter/Dockerfile
restart: unless-stopped
ports:
- 0.0.0.0:9001:9001
volumes:
- ./notebooks:/notebooks
- ./jupyter/notebooks:/notebooks
- ./jupyter/overrides.json:/opt/conda/share/jupyter/lab/settings/overrides.json
environment:
- JUPYTER_TOKEN=12345
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities:
- gpu

34
jupyter/Dockerfile Normal file
View file

@ -0,0 +1,34 @@
FROM continuumio/miniconda3
# docker run -i -t -p 8888:8888 continuumio/miniconda3 /bin/bash \
# -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir \
# /opt/notebooks && /opt/conda/bin/jupyter notebook \
# --notebook-dir=/opt/notebooks --ip='*' --port=8888 \
# --no-browser --allow-root"
RUN conda config --quiet --add channels conda-forge \
&& conda install -c conda-forge --quiet -y jupyterlab
#RUN conda install -c conda-forge --quiet --freeze-installed -y \
RUN conda install -c conda-forge --quiet -y \
pandas \
librosa \
matplotlib \
pyarrow \
pillow=9.4.0 \
tensorflow \
keras \
&& /bin/true # only added to make the installed package lines consistent
# (NO) libtiff
# pillow
CMD /opt/conda/bin/jupyter lab \
--notebook-dir=/notebooks \
--ip='*' \
--port=9001 \
--no-browser \
--allow-root

5
jupyter/overrides.json Normal file
View file

@ -0,0 +1,5 @@
{
"@jupyterlab/apputils-extension:themes": {
"theme": "JupyterLab Dark"
}
}

View file

@ -1,19 +0,0 @@
FROM continuumio/miniconda3
# docker run -i -t -p 8888:8888 continuumio/miniconda3 /bin/bash \
# -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir \
# /opt/notebooks && /opt/conda/bin/jupyter notebook \
# --notebook-dir=/opt/notebooks --ip='*' --port=8888 \
# --no-browser --allow-root"
RUN /opt/conda/bin/conda install jupyterlab -y --quiet \
&& mkdir /opt/notebooks
CMD /opt/conda/bin/jupyter lab \
--notebook-dir=/notebooks \
--ip='*' \
--port=9001 \
--no-browser \
--allow-root