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

[SPARK-40528] Support dockerfile template #12

Closed
wants to merge 3 commits into from

Conversation

Yikun
Copy link
Member

@Yikun Yikun commented Oct 17, 2022

What changes were proposed in this pull request?

This patch:

  • Add dockerfile template: Dockerfile.template contains 3 vars: BASE_IMAGE for base image name, HAVE_PY for adding python support, HAVE_R for adding sparkr support.
  • Add a script: add-dockerfiles.sh, you can ./add-dockerfiles.sh 3.3.0
  • Add a tool: tempalte.py to help generate dockerfile from jinja template.

Why are the changes needed?

Generate the dockerfiles to make life easier.

Does this PR introduce any user-facing change?

No, dev only.

How was this patch tested?

# Prepare new env
python3 -m venv ~/xxx
pip install -r ./tools/requirements.txt
source ~/xxx/bin/activate

# Generate 3.3.0
./add-dockerfiles.sh 3.3.0

# no diff
git diff

lint:

$ flake8 ./tools/template.py
$ black ./tools/template.py
All done! ✨ 🍰 ✨
1 file left unchanged.

Dockerfile.template Outdated Show resolved Hide resolved
add-dockerfiles.sh Outdated Show resolved Hide resolved
@Yikun Yikun marked this pull request as ready for review October 17, 2022 08:16
@Yikun
Copy link
Member Author

Yikun commented Oct 17, 2022

(venv) ➜  spark-docker git:(SPARK-40528) flake8 ./tools/template.py
(venv) ➜  spark-docker git:(SPARK-40528) black ./tools/template.py
All done! ✨ 🍰 ✨
1 file left unchanged.
(venv) ➜  spark-docker git:(SPARK-40528) ./add-dockerfiles.sh 3.3.0
(venv) ➜  spark-docker git:(SPARK-40528) git --no-pager diff

Just a rebase, will merge soon

@Yikun Yikun closed this in 6459e3d Oct 17, 2022
@Yikun
Copy link
Member Author

Yikun commented Oct 17, 2022

@HyukjinKwon @martin-g Thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants