|
1 | 1 | # Run SQLFlow Using Docker |
2 | 2 |
|
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 |
4 | 4 | server, sample datasets, Jupyter Notebook server, and the SQLFlow plugin for Jupyter. |
5 | 5 |
|
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. |
7 | 7 |
|
8 | 8 | ## Preparation |
9 | 9 |
|
10 | 10 | 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 |
12 | 12 | build the Docker image from source code following [this guide](../build.md). |
13 | 13 |
|
14 | 14 | ``` |
15 | 15 | docker pull sqlflow/sqlflow |
| 16 | + docker pull sqlflow/sqlflow:mysql |
| 17 | + docker pull sqlflow/sqlflow:jupyter |
16 | 18 | ``` |
17 | 19 |
|
18 | 20 | ## Try Out SQLFlow Using Notebook |
19 | 21 |
|
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. |
21 | 23 |
|
22 | 24 | ``` |
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 |
24 | 28 | ``` |
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. |
28 | 31 |
|
29 | 32 | ## Connect to Your Own Database |
30 | 33 |
|
|
0 commit comments