forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change docker and ci build to mimic ingestion
- Loading branch information
Showing
2 changed files
with
95 additions
and
27 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
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,23 +1,38 @@ | ||
FROM python:3.8-slim as base | ||
RUN apt-get update && apt-get install -y jq | ||
RUN apt update && apt install -y build-essential python3-dev | ||
# FROM python:3.8-slim as base | ||
# RUN apt-get update && apt-get install -y jq | ||
# RUN apt update && apt install -y build-essential python3-dev | ||
|
||
# FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-slim as base | ||
FROM openjdk:8 as prod-build | ||
COPY . /datahub-src | ||
RUN cd /datahub-src && ./gradlew :metadata-ingestion:codegen -d | ||
# # FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-slim as base | ||
# FROM openjdk:8 as prod-build | ||
# COPY . /datahub-src | ||
# RUN cd /datahub-src && ./gradlew :metadata-ingestion:codegen -d | ||
|
||
FROM base as prod-codegen | ||
COPY --from=prod-build /datahub-src /datahub-src | ||
RUN cd /datahub-src/metadata-ingestion && \ | ||
pip install -e ".[base]" | ||
# FROM base as prod-codegen | ||
# COPY --from=prod-build /datahub-src /datahub-src | ||
# RUN cd /datahub-src/metadata-ingestion && \ | ||
# pip install -e ".[base]" | ||
|
||
FROM base as final | ||
# FROM base as final | ||
# ENV PROMETHEUS_MULTIPROC_DIR=/gunicorn/ | ||
# COPY --from=prod-codegen /datahub-src/metadata-ingestion /datahub-ingestion | ||
# RUN pip install /datahub-ingestion/. | ||
# COPY ./ingest-api/ /ingest-api/ | ||
# WORKDIR /ingest-api/ingest_api | ||
# RUN pip install -r ../requirements.txt && pip install ../ && mkdir /gunicorn/ | ||
# CMD ["gunicorn", "-c", "config.py", "main:app", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8001"] | ||
|
||
ARG APP_ENV=full | ||
ARG BASE_IMAGE=acryldata/datahub-ingestion-base | ||
ARG DOCKER_VERSION=head | ||
|
||
FROM $BASE_IMAGE:$DOCKER_VERSION as base | ||
USER 0 | ||
ENV PROMETHEUS_MULTIPROC_DIR=/gunicorn/ | ||
COPY --from=prod-codegen /datahub-src/metadata-ingestion /datahub-ingestion | ||
RUN pip install /datahub-ingestion/. | ||
COPY ./metadata-ingestion /datahub-ingestion | ||
WORKDIR /datahub-ingestion | ||
RUN pip install --no-cache --user ".[base]" | ||
|
||
COPY ./ingest-api/ /ingest-api/ | ||
WORKDIR /ingest-api/ingest_api | ||
RUN pip install -r ../requirements.txt && pip install ../ && mkdir /gunicorn/ | ||
CMD ["gunicorn", "-c", "config.py", "main:app", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8001"] | ||
|