Skip to content

Commit

Permalink
Merge pull request #292 from nabenabe0928/fix-docker-recipe
Browse files Browse the repository at this point in the history
Adapt docker recipes to Python 3.11
  • Loading branch information
not522 authored Nov 15, 2024
2 parents 0c6999a + e178311 commit 419aed1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ Our Docker images for most examples are available with the tag ending with `-dev
For example, [PyTorch Simple](./pytorch/pytorch_simple.py) can be run via:

```bash
$ docker run --rm -v $(pwd):/prj -w /prj optuna/optuna:py3.7-dev python pytorch/pytorch_simple.py
$ docker run --rm -v $(pwd):/prj -w /prj optuna/optuna:py3.11-dev python pytorch/pytorch_simple.py
```

Additionally, our visualization example can also be run on Jupyter Notebook by opening `localhost:8888` in your browser after executing the following:

```bash
$ docker run -p 8888:8888 --rm optuna/optuna:py3.7-dev jupyter notebook --allow-root --no-browser --port 8888 --ip 0.0.0.0 --NotebookApp.token='' --NotebookApp.password=''
$ docker run -p 8888:8888 --rm optuna/optuna:py3.11-dev jupyter notebook --allow-root --no-browser --port 8888 --ip 0.0.0.0 --NotebookApp.token='' --NotebookApp.password=''
```
8 changes: 3 additions & 5 deletions kubernetes/mlflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# NOTE(crcrpar): optuna/optuna:py3.7-dev can be used as base instead.
FROM python:3.7-slim-buster
FROM python:3.11-slim

WORKDIR /usr/src/

RUN pip install --no-cache-dir optuna psycopg2-binary mlflow \
&& pip install --no-cache-dir \
torch==1.10.0+cpu \
torchvision==0.11.1+cpu \
-f https://download.pytorch.org/whl/torch_stable.html \
&& pip install --no-cache-dir torch torchvision \
--index-url https://download.pytorch.org/whl/cpu \
&& pip install pytorch-lightning

COPY pytorch_lightning_distributed.py .
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/simple/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim-buster
FROM python:3.11-slim

WORKDIR /usr/src/

Expand Down

0 comments on commit 419aed1

Please sign in to comment.