-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
3,501 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,7 @@ docs/_build/ | |
$HOME | ||
rabbitmq/ | ||
venv/ | ||
.env | ||
.env | ||
**.pem | ||
**.key | ||
station_data |
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,4 +1,4 @@ | ||
FROM ubuntu | ||
FROM python:3.10-bullseye | ||
MAINTAINER [email protected] | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
@@ -16,31 +16,19 @@ RUN apt -y update && apt-get -y install software-properties-common && \ | |
netcat \ | ||
locales \ | ||
curl && \ | ||
# install python | ||
add-apt-repository ppa:deadsnakes/ppa && \ | ||
apt-get install -y python3.8 && apt install python-is-python3 && apt install -y python3-pip && \ | ||
# # install python | ||
# apt install python-is-python3 && apt install -y python3-pip && \ | ||
rm -rf /var/lib/apt/lists | ||
|
||
|
||
# Install container diff library | ||
RUN curl -LO https://storage.googleapis.com/container-diff/latest/container-diff-linux-amd64 && \ | ||
install container-diff-linux-amd64 /usr/local/bin/container-diff | ||
|
||
# install airflow | ||
RUN pip install "apache-airflow[celery,crypto,hashicorp,password,postgres,redis]==2.2.4" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.4/constraints-3.8.txt" | ||
RUN pip install "apache-airflow[celery,crypto,hashicorp,password,postgres,redis]==2.5.1" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.5.1/constraints-3.10.txt" | ||
# install train container library | ||
RUN pip install --force-reinstall --no-cache-dir -v "pht-train-container-library==2.0.2" | ||
|
||
RUN mkdir /opt/train_data | ||
COPY requirements.txt /tmp/requirements.txt | ||
|
||
|
||
RUN pip install -r /tmp/requirements.txt | ||
|
||
|
||
COPY airflow.cfg /root/airflow/airflow.cfg | ||
COPY ./dags /root/airflow/dags | ||
# install train container library | ||
|
||
RUN pip install git+https://github.com/PHT-Medic/train-container-library.git | ||
|
||
COPY entrypoint.sh /root/entrypoint.sh | ||
RUN chmod +x /root/entrypoint.sh | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ set -e | |
|
||
if [ "$1" = 'webserver' ]; then | ||
airflow db init | ||
airflow users create --username $AIRFLOW_USER --firstname Station --lastname Admin --role Admin --email [email protected] -p $AIRFLOW_PW | ||
airflow users create --username $AIRFLOW_USER --firstname Station --lastname Admin --role Admin --email [email protected] --password $AIRFLOW_PW | ||
airflow scheduler & | ||
exec airflow webserver | ||
|
||
|
@@ -13,7 +13,7 @@ elif [ "$1" = 'worker' ]; then | |
|
||
elif [ "$1" = 'init' ]; then | ||
airflow db init | ||
airflow users create --username $AIRFLOW_USER --firstname FIRST_NAME --lastname LAST_NAME --role Admin --email [email protected] -p $AIRFLOW_PW | ||
airflow users create --username $AIRFLOW_USER --firstname FIRST_NAME --lastname LAST_NAME --role Admin --email [email protected] --password $AIRFLOW_PW | ||
# airflow connections add 'station_db' --conn-type 'postgres' --conn-login 'admin' --conn-password 'admin' --conn-host 'postgres' --conn-port '5432' --conn-schema "pht_station_${STATION_ID}" | ||
# exec station_airflow worker | ||
else | ||
|
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.