-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
building feast-dev locally into docker image
Signed-off-by: Chester Ong <[email protected]>
- Loading branch information
1 parent
9537946
commit 9f397fe
Showing
3 changed files
with
35 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 35 additions & 14 deletions
49
sdk/python/feast/infra/feature_servers/multicloud/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,40 @@ | ||
FROM python:3.9 | ||
FROM python:3.9-slim AS builder | ||
|
||
RUN apt update && \ | ||
apt install -y \ | ||
jq \ | ||
python3-dev \ | ||
build-essential | ||
RUN apt-get update && apt-get install -y git | ||
|
||
RUN pip install pip --upgrade | ||
RUN pip install "feast[aws,gcp,snowflake,redis,go,mysql,postgres]" | ||
# Allow statements and log messages to immediately appear in the Knative logs | ||
ENV PYTHONUNBUFFERED True | ||
|
||
# Copy local code to the container image. | ||
ENV APP_HOME /app | ||
WORKDIR $APP_HOME | ||
|
||
# Copy necessary parts of the Feast codebase | ||
COPY . . | ||
|
||
# Install production dependencies into the virtual environment | ||
RUN python -m venv .venv && . .venv/bin/activate && pip install '.[aws,gcp,snowflake,redis,go,mysql,postgres]' | ||
|
||
FROM python:3.9-slim AS runner | ||
|
||
# Allow statements and log messages to immediately appear in the Knative logs | ||
ENV PYTHONUNBUFFERED True | ||
|
||
# Copy local code to the container image. | ||
ENV APP_HOME /app | ||
WORKDIR $APP_HOME | ||
|
||
# Copy the virtual environment with the production dependencies from the builder stage | ||
COPY --from=builder $APP_HOME/.venv $APP_HOME/.venv | ||
ENV PATH="$APP_HOME/.venv/bin:${PATH}" | ||
|
||
# Add runtime dependencies such as libarrow | ||
RUN apt-get update && \ | ||
apt-get install -y git cmake ca-certificates lsb-release wget && \ | ||
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb &&\ | ||
apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb &&\ | ||
apt-get update &&\ | ||
apt-get install -y libarrow-dev &&\ | ||
apt-get clean | ||
|
||
RUN apt update | ||
RUN apt install -y -V ca-certificates lsb-release wget | ||
RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | ||
RUN apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | ||
RUN apt update | ||
RUN apt -y install libarrow-dev | ||
RUN mkdir -m 775 /.cache |
19 changes: 0 additions & 19 deletions
19
sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev
This file was deleted.
Oops, something went wrong.