improve dockerfiles and adjust code paths
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Install envsubst
|
||||
RUN apt-get update && apt-get install -y gettext
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Dagster libraries to run both dagit and the dagster-daemon. Does not
|
||||
# need to have access to any pipeline code.
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends --yes \
|
||||
curl gettext \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
||||
ENV DAGSTER_HOME=/opt/dagster/home/
|
||||
WORKDIR $DAGSTER_HOME
|
||||
COPY dagster-requirements.txt requirements.txt
|
||||
|
||||
RUN pip install uv
|
||||
RUN uv pip install -r requirements.txt --system
|
||||
RUN uv pip install polars-lts-cpu --system
|
||||
|
||||
# Set $DAGSTER_HOME and copy dagster instance and workspace YAML there
|
||||
ENV DAGSTER_HOME=/opt/dagster/home/
|
||||
RUN uv pip install -r requirements.txt --system \
|
||||
&& uv pip install polars-lts-cpu --system
|
||||
|
||||
RUN mkdir -p $DAGSTER_HOME
|
||||
|
||||
# COPY dagster.yaml workspace.yaml $DAGSTER_HOME
|
||||
|
||||
# Create entrypoint that renders the dagster.yaml from a template
|
||||
RUN cat << 'EOF' > /entrypoint.sh
|
||||
#!/bin/sh
|
||||
@@ -33,6 +34,4 @@ EOF
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
ENV PYTHONPATH=/system:$PYTHONPATH
|
||||
|
||||
WORKDIR $DAGSTER_HOME
|
||||
ENV PYTHONPATH=/code/system:$PYTHONPATH
|
||||
|
||||
Reference in New Issue
Block a user