Skip to content

Commit 0ed3e61

Browse files
authored
update docker usage docs (#2856)
1 parent a17aeab commit 0ed3e61

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

doc/quick_start.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
It's quite simple to try out SQLFlow using [Docker](https://docs.docker.com/).
44

55
1. Install [Docker Community Edition](https://docs.docker.com/install/).
6-
1. Run SQLflow by typing the command `docker run -it -p 8888:8888 sqlflow/sqlflow`.
7-
1. Access localhost:8888 in your Web browser.
8-
1. Open the notebook `iris-dnn.ipynb`.
6+
1. Run SQLflow by typing the below command:
7+
```bash
8+
docker run --name=sqlflow-mysql -d -p 8888:8888 sqlflow/sqlflow:mysql
9+
docker run --net=container:sqlflow-mysql -d sqlflow/sqlflow:latest sqlflowserver
10+
docker run --net=container:sqlflow-mysql -d sqlflow/sqlflow:jupyter
11+
```
12+
1. Wait until the docker containers are all running, then access http://localhost:8888 in your Web browser.
13+
1. Open the a tutorial notebook like `iris-dnn.ipynb` and run the examples.
914

1015

1116
For advanced usage, you might want to go on reading

doc/run/docker.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
# Run SQLFlow Using Docker
22

3-
SQLFlow releases an "all-in-one" Docker image that contains the SQLFlow server, MySQL
3+
SQLFlow releases several Docker images that contains the SQLFlow server, MySQL
44
server, sample datasets, Jupyter Notebook server, and the SQLFlow plugin for Jupyter.
55

6-
You can use this Docker image for either local trying out or production deployment.
6+
You can use these Docker images for either local trying out or production deployment.
77

88
## Preparation
99

1010
1. Install [Docker Community Edition](https://docs.docker.com/install/) on your PC/Macbook/Server.
11-
1. Pull the latest SQLFlow "all-in-one" Docker image. Or you can also
11+
1. Pull the latest SQLFlow Docker images. Or you can also
1212
build the Docker image from source code following [this guide](../build.md).
1313

1414
```
1515
docker pull sqlflow/sqlflow
16+
docker pull sqlflow/sqlflow:mysql
17+
docker pull sqlflow/sqlflow:jupyter
1618
```
1719

1820
## Try Out SQLFlow Using Notebook
1921

20-
1. Type the below command to start the container:
22+
1. Type the below command to start three containers to start a MySQL server, SQLFlow server and a Jupyter notebook server.
2123

2224
```
23-
docker run --rm -it -p 8888:8888 sqlflow/sqlflow
25+
docker run --name=sqlflow-mysql -d -p 8888:8888 sqlflow/sqlflow:mysql
26+
docker run --net=container:sqlflow-mysql -d sqlflow/sqlflow:lateset sqlflowserver
27+
docker run --net=container:sqlflow-mysql -d sqlflow/sqlflow:jupyter
2428
```
25-
26-
1. Open a web browser, go to `localhost:8888`, open `iris-dnn.ipynb` file, then you can
27-
follow the tutorial and run the SQL statements to run the training and prediction.
29+
1. You can also use a specified version (e.g. `v0.4.0`) of the SQLFlow server by changing the second line above to `docker run --net=container:sqlflow-mysql -d sqlflow/sqlflow:v0.4.0 sqlflowserver`.
30+
1. Open a web browser, go to `localhost:8888`, open any tutorial notebook like `iris-dnn.ipynb` file, then you can follow the tutorial and run the SQL statements to run the training and prediction.
2831

2932
## Connect to Your Own Database
3033

0 commit comments

Comments
 (0)