Skip to content

Commit 90c9786

Browse files
woopShu Heng
authored andcommitted
Deduplicate example notebooks (#456)
* Deduplicate example notebooks * Merge docker-compose.yml for both batch and online serving.
1 parent 84cbf22 commit 90c9786

11 files changed

Lines changed: 242 additions & 1218 deletions

File tree

examples/basic/basic.ipynb

Lines changed: 191 additions & 65 deletions
Large diffs are not rendered by default.

infra/docker-compose/.env.sample

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
# General
12
COMPOSE_PROJECT_NAME=feast
2-
33
FEAST_VERSION=latest
44

5+
# Feast Core
56
FEAST_CORE_IMAGE=gcr.io/kf-feast/feast-core
6-
FEAST_CORE_CONFIG=direct-runner
7-
FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY=placeholder
7+
FEAST_CORE_CONFIG=direct-runner.yml
8+
FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY=placeholder.json
89

10+
# Feast Serving
911
FEAST_SERVING_IMAGE=gcr.io/kf-feast/feast-serving
10-
FEAST_ONLINE_SERVING_CONFIG=online-serving
11-
FEAST_ONLINE_STORE_CONFIG=redis-store
12-
FEAST_BATCH_SERVING_CONFIG=batch-serving
13-
FEAST_BATCH_STORE_CONFIG=bq-store
14-
FEAST_BATCH_SERVING_GCP_SERVICE_ACCOUNT_KEY=placeholder
15-
FEAST_JOB_STAGING_LOCATION=gs://your-gcp-project/bucket
12+
FEAST_ONLINE_SERVING_CONFIG=online-serving.yml
13+
FEAST_ONLINE_STORE_CONFIG=redis-store.yml
14+
FEAST_BATCH_SERVING_CONFIG=batch-serving.yml
15+
FEAST_BATCH_STORE_CONFIG=bq-store.yml
16+
FEAST_BATCH_SERVING_GCP_SERVICE_ACCOUNT_KEY=placeholder.json
17+
FEAST_JOB_STAGING_LOCATION=gs://your-gcs-bucket/staging
1618

17-
FEAST_JUPYTER_IMAGE=gcr.io/kf-feast/feast-jupyter
18-
FEAST_JUPYTER_GCP_SERVICE_ACCOUNT_KEY=placeholder
19+
# Jupyter
20+
FEAST_JUPYTER_GCP_SERVICE_ACCOUNT_KEY=placeholder.json
1921

infra/docker-compose/docker-compose.batch.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

infra/docker-compose/docker-compose.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ services:
44
core:
55
image: ${FEAST_CORE_IMAGE}:${FEAST_VERSION}
66
volumes:
7-
- ./core/${FEAST_CORE_CONFIG}.yml:/etc/feast/application.yml
8-
- ./gcp-service-accounts/${FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY}.json:/etc/gcloud/service-accounts/key.json
7+
- ./core/${FEAST_CORE_CONFIG}:/etc/feast/application.yml
8+
- ./gcp-service-accounts/${FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY}:/etc/gcloud/service-accounts/key.json
99
environment:
1010
DB_HOST: db
1111
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json
@@ -24,8 +24,8 @@ services:
2424
online-serving:
2525
image: ${FEAST_SERVING_IMAGE}:${FEAST_VERSION}
2626
volumes:
27-
- ./serving/${FEAST_ONLINE_SERVING_CONFIG}.yml:/etc/feast/application.yml
28-
- ./serving/${FEAST_ONLINE_STORE_CONFIG}.yml:/etc/feast/store.yml
27+
- ./serving/${FEAST_ONLINE_SERVING_CONFIG}:/etc/feast/application.yml
28+
- ./serving/${FEAST_ONLINE_STORE_CONFIG}:/etc/feast/store.yml
2929
depends_on:
3030
- core
3131
- redis
@@ -38,12 +38,34 @@ services:
3838
- /opt/feast/feast-serving.jar
3939
- --spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml
4040

41+
batch-serving:
42+
image: ${FEAST_SERVING_IMAGE}:${FEAST_VERSION}
43+
volumes:
44+
- ./serving/${FEAST_BATCH_SERVING_CONFIG}:/etc/feast/application.yml
45+
- ./serving/${FEAST_BATCH_STORE_CONFIG}:/etc/feast/store.yml
46+
- ./gcp-service-accounts/${FEAST_BATCH_SERVING_GCP_SERVICE_ACCOUNT_KEY}:/etc/gcloud/service-accounts/key.json
47+
depends_on:
48+
- core
49+
- redis
50+
ports:
51+
- 6567:6567
52+
restart: on-failure
53+
environment:
54+
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json
55+
FEAST_JOB_STAGING_LOCATION: ${FEAST_JOB_STAGING_LOCATION}
56+
command:
57+
- "java"
58+
- "-Xms1024m"
59+
- "-Xmx1024m"
60+
- "-jar"
61+
- "/opt/feast/feast-serving.jar"
62+
- "--spring.config.location=classpath:/application.yml,file:/etc/feast/application.yml"
63+
4164
jupyter:
42-
image: ${FEAST_JUPYTER_IMAGE}:${FEAST_VERSION}
65+
image: jupyter/datascience-notebook:latest
4366
volumes:
44-
- ./jupyter/notebooks:/home/jovyan/feast-notebooks
45-
- ./jupyter/features:/home/jovyan/features
46-
- ./gcp-service-accounts/${FEAST_JUPYTER_GCP_SERVICE_ACCOUNT_KEY}.json:/etc/gcloud/service-accounts/key.json
67+
- ../../:/home/jovyan/feast
68+
- ./gcp-service-accounts/${FEAST_JUPYTER_GCP_SERVICE_ACCOUNT_KEY}:/etc/gcloud/service-accounts/key.json
4769
depends_on:
4870
- core
4971
- online-serving

infra/docker-compose/jupyter/features/cust_trans_fs.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

infra/docker-compose/jupyter/features/cust_trans_fs_updated.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)