-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_user_code
41 lines (29 loc) · 1.07 KB
/
Dockerfile_user_code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.8-slim
ARG GCP_DBT_KEY_PATH
# Checkout and install dagster libraries needed to run the gRPC server
# exposing your repository to dagit and dagster-daemon, and to load the DagsterInstance
RUN apt-get update
RUN apt-get install -y build-essential python-dev git
RUN pip install \
dagster \
dagster-postgres \
dagster-docker
# Copy and install actions requirements
COPY ./dags/requirements.txt ./
RUN pip install -r requirements.txt --no-cache-dir
# Download spacy language data
RUN python -m spacy download en_core_web_md
# Create folder for models
RUN mkdir -p /opt/dagster/models
RUN mkdir -p /opt/dagster/spacy_configs
RUN mkdir -p /opt/dagster/dags
# Copy service account key
COPY $GCP_DBT_KEY_PATH /opt/dagster/gcp_key.json
WORKDIR /opt/dagster/dags
# Add repository code
# COPY ./dags/ /opt/dagster/app
# Run dagster gRPC server on port 4000
EXPOSE 4000
# CMD allows this to be overridden from run launchers or executors that want
# to run other commands against your repository
CMD ["dagster", "api", "grpc", "-h", "0.0.0.0", "-p", "4000", "-f", "repo.py"]