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

using ghcr.io/kbase img for standalone spark deployment #75

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
23 changes: 12 additions & 11 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ services:
yarn-resourcemanager:
image: ghcr.io/kbase/cdm-prototype-yarn:pr-8
container_name: yarn-resourcemanager
# Images from the ghcr.io/kbase registry are exclusively available for Linux/AMD64 platforms.
platform: linux/amd64
Comment on lines +10 to +11
Copy link
Member

Choose a reason for hiding this comment

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

Does this fix the mac issues?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. Without this, docker compose won't run on Mac machines since it cannot find the arm64 version. I used to manually modify docker-compose file before running it.

ports:
- 8088:8088 # web ui
environment:
Expand All @@ -18,6 +20,7 @@ services:
yarn-nodemanager:
image: ghcr.io/kbase/cdm-prototype-yarn:pr-8
container_name: yarn-nodemanager
platform: linux/amd64
ports:
- 8042:8042 # web ui
environment:
Expand All @@ -28,10 +31,10 @@ services:
- MINIO_SECRET_KEY=yarnpass

spark-master:
build:
context: .
dockerfile: Dockerfile
# The latest image from cdm-jupyterhub that includes spark standalone mode
image: ghcr.io/kbase/cdm-jupyterhub:pr-74
container_name: spark-master
platform: linux/amd64
ports:
- "8090:8090"
environment:
Expand All @@ -46,10 +49,10 @@ services:
- ./cdr/cdm/jupyter:/cdm_shared_workspace

spark-worker-1:
build:
context: .
dockerfile: Dockerfile
# The latest image from cdm-jupyterhub that includes spark standalone mode
image: ghcr.io/kbase/cdm-jupyterhub:pr-74
container_name: spark-worker-1
platform: linux/amd64
depends_on:
- spark-master
ports:
Expand All @@ -68,10 +71,10 @@ services:
- ./cdr/cdm/jupyter:/cdm_shared_workspace

spark-worker-2:
build:
context: .
dockerfile: Dockerfile
# The latest image from cdm-jupyterhub that includes spark standalone mode
image: ghcr.io/kbase/cdm-jupyterhub:pr-74
container_name: spark-worker-2
platform: linux/amd64
depends_on:
- spark-master
ports:
Expand Down Expand Up @@ -139,7 +142,6 @@ services:
- MINIO_ACCESS_KEY=minio-readwrite
- MINIO_SECRET_KEY=minio123
- S3_YARN_BUCKET=yarn
- SPARK_MODE=notebook
- MAX_EXECUTORS=4
- POSTGRES_USER=hive
- POSTGRES_PASSWORD=hivepassword
Expand Down Expand Up @@ -168,7 +170,6 @@ services:
- MINIO_ACCESS_KEY=minio-readonly
- MINIO_SECRET_KEY=minio123
- S3_YARN_BUCKET=yarn
- SPARK_MODE=notebook
- MAX_EXECUTORS=4
# TODO: create postgres user w/ only write access to the hive tables
- POSTGRES_USER=hive
Expand Down
9 changes: 1 addition & 8 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@

. /opt/scripts/setup.sh

if [ "$SPARK_MODE" = "notebook" ]; then
exec /opt/scripts/notebook_entrypoint.sh "$@"
else
# In bitnami/spark Dockerfile, the entrypoint is set to /opt/bitnami/scripts/spark/entrypoint.sh and followed
# by CMD ["/opt/bitnami/scripts/spark/run.sh"] meaning that the entrypoint is expected the run.sh script as an argument.
# reference: https://github.com/bitnami/containers/blob/main/bitnami/spark/3.5/debian-12/Dockerfile#L69
exec /opt/bitnami/scripts/spark/entrypoint.sh "$@" /opt/bitnami/scripts/spark/run.sh
fi
exec /opt/scripts/notebook_entrypoint.sh "$@"
Loading