Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for PipelineDP #246

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Dockerfile/restaraunt_visits_without_frameworks/Dockerfile
Original file line number Diff line number Diff line change
@@ -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<wenhuizhang.psu@gmail.com> <wenhui.zhang@bytedance.com> <wenhui@gwmail.gwu.edu>

# commands executed in terminal
RUN set -x

# build deps
RUN apt-get update
RUN apt-get -y install git vim
wenhuizhang marked this conversation as resolved.
Show resolved Hide resolved
wenhuizhang marked this conversation as resolved.
Show resolved Hide resolved
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
wenhuizhang marked this conversation as resolved.
Show resolved Hide resolved


# download source
RUN git clone https://github.com/OpenMined/PipelineDP.git
RUN cd /PipelineDP && git checkout v0.1.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to change this version


# 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
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,45 @@ sample of it. Here's how to take a subset of the data in bash:

3. Run `python movie_view_ratings.py --input_file=<path to data.txt from 2> --output_file=<...>`

## Dockerfile to tryout
To build and test a Dockerfile, please:
```
cd ./Dockerfile

docker image build -t $test_case:$version
wenhuizhang marked this conversation as resolved.
Show resolved Hide resolved
```

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/
```

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

If you have questions about the PipelineDP, join
Expand Down