From 27395d941d97bc7761063eeb455cb01b787fa538 Mon Sep 17 00:00:00 2001 From: Wenhui Zhang Date: Sat, 12 Feb 2022 18:33:05 -0800 Subject: [PATCH 1/6] Create Dockerfile --- .../Dockerfile | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Dockerfile/restaraunt_visits_without_frameworks/Dockerfile diff --git a/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile b/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile new file mode 100644 index 00000000..a3259e62 --- /dev/null +++ b/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile @@ -0,0 +1,46 @@ +# Copyright 2022 OpenMined. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# base image +FROM ubuntu:20.04 + +# maintainer +MAINTAINER wenhui zhang + +# commands executed in terminal +RUN set -x + +# build deps +RUN apt-get update +RUN apt-get -y install git vim +RUN apt-get -y install libssl-dev +RUN apt-get -y install ca-certificates +RUN apt-get -y install curl +RUN apt-get -y install gnupg +RUN apt-get -y install lsb-release +#RUN apt-get -y install default-jre +RUN apt-get -y install python3 python3-pip + +RUN pip3 install pandas pipeline-dp apache-beam absl-py + + +# download source +RUN git clone https://github.com/OpenMined/PipelineDP.git +RUN cd /PipelineDP && git checkout v0.1.1 + +# check modes and run example + +RUN python3 /PipelineDP/examples/restaraunt_visits/run_without_frameworks.py --input_file=/PipelineDP/examples/restaraunt_visits/restaraunts_week_d +RUN cat /PipelineDP/examples/restaraunt_visits/out.txt From dc5b9978d8a585ac766a7b6b17f382bf2bded89f Mon Sep 17 00:00:00 2001 From: Wenhui Zhang Date: Sat, 12 Feb 2022 18:36:42 -0800 Subject: [PATCH 2/6] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index a77696b9..4dd7f466 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,22 @@ sample of it. Here's how to take a subset of the data in bash: 3. Run `python movie_view_ratings.py --input_file= --output_file=<...>` +## Dockerfile to tryout +To build and test a Dockerfile, please: +``` +cd ./Dockerfile + +docker build $test_case +``` +where the `$test_case` could be examples you would like to try out, such as "restaraunt_visits_without_frameworks". + +``` +cd ./Dockerfile + +docker build restaraunt_visits_without_frameworks +``` + + ## Support and Community on Slack If you have questions about the PipelineDP, join From 7cb19e6548c589fb0a68b796eb713b0fd5d58390 Mon Sep 17 00:00:00 2001 From: Wenhui Zhang Date: Sat, 12 Feb 2022 20:41:02 -0800 Subject: [PATCH 3/6] Update README.md --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4dd7f466..ca2afa57 100644 --- a/README.md +++ b/README.md @@ -121,16 +121,37 @@ To build and test a Dockerfile, please: ``` cd ./Dockerfile -docker build $test_case +docker image build -t $test_case:$version ``` where the `$test_case` could be examples you would like to try out, such as "restaraunt_visits_without_frameworks". +The `$version` is a tag for image, it could be version number you would like to assign to this image, the default tag is `latest` + ``` cd ./Dockerfile -docker build restaraunt_visits_without_frameworks +docker build -t restaraunt_visits_without_frameworks:latest +``` + +Then use `docker container run` to run the image. +For example: +``` +docker container run -p 8000:7000 -it restaraunt_visits_without_frameworks:latest +``` +If you would like to run with bash, then +``` +docker container run -p 8000:7000 -it restaraunt_visits_without_frameworks:latest /bin/bash ``` +To check ID of your image, use +``` +docker container ls +``` + +To stop execution of the container instance, use +``` +docker container kill [containerID] +``` ## Support and Community on Slack From f7efd0e9ff3664d5b398769163924370850ea565 Mon Sep 17 00:00:00 2001 From: Wenhui Zhang Date: Sat, 12 Feb 2022 21:04:00 -0800 Subject: [PATCH 4/6] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca2afa57..e9085cbc 100644 --- a/README.md +++ b/README.md @@ -123,14 +123,16 @@ cd ./Dockerfile docker image build -t $test_case:$version ``` + where the `$test_case` could be examples you would like to try out, such as "restaraunt_visits_without_frameworks". The `$version` is a tag for image, it could be version number you would like to assign to this image, the default tag is `latest` + ``` cd ./Dockerfile -docker build -t restaraunt_visits_without_frameworks:latest +docker build -t restaraunt_visits_without_frameworks/ ``` Then use `docker container run` to run the image. From 6992eebae6635aa5efcdcbabdfd064fc145bc7e1 Mon Sep 17 00:00:00 2001 From: Wenhui Zhang Date: Wed, 27 Apr 2022 16:19:33 -0700 Subject: [PATCH 5/6] Update Dockerfile --- Dockerfile/restaraunt_visits_without_frameworks/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile b/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile index a3259e62..fd65a508 100644 --- a/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile +++ b/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile @@ -17,14 +17,14 @@ FROM ubuntu:20.04 # maintainer -MAINTAINER wenhui zhang +MAINTAINER wenhui zhang # commands executed in terminal RUN set -x # build deps RUN apt-get update -RUN apt-get -y install git vim +RUN apt-get -y install git RUN apt-get -y install libssl-dev RUN apt-get -y install ca-certificates RUN apt-get -y install curl @@ -33,7 +33,8 @@ RUN apt-get -y install lsb-release #RUN apt-get -y install default-jre RUN apt-get -y install python3 python3-pip -RUN pip3 install pandas pipeline-dp apache-beam absl-py +RUN pip3 install pandas pipeline-dp absl-py +#apache-beam absl-py # download source From 13c900f5ca65e4bc58c574142d87bd292e6719a5 Mon Sep 17 00:00:00 2001 From: Wenhui Zhang Date: Sun, 26 Feb 2023 13:48:16 -0800 Subject: [PATCH 6/6] Update Dockerfile with PipelineDP newer version --- Dockerfile/restaraunt_visits_without_frameworks/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile b/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile index fd65a508..d0ae41b5 100644 --- a/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile +++ b/Dockerfile/restaraunt_visits_without_frameworks/Dockerfile @@ -39,7 +39,7 @@ RUN pip3 install pandas pipeline-dp absl-py # download source RUN git clone https://github.com/OpenMined/PipelineDP.git -RUN cd /PipelineDP && git checkout v0.1.1 +RUN cd /PipelineDP && git checkout v0.2.0 # check modes and run example