-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
53 lines (30 loc) · 1.81 KB
/
README
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
42
43
44
45
46
47
48
49
50
51
52
docker build --platform linux/arm64 -t airflow:1.0.0 -f Dockerfile .
docker build -t airflow:1.0.0 -f Dockerfile .
docker run --rm -t -d -p 8080:8080 --name airflow1 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /home/cosi/cosi-airflow:/shared_dir airflow:1.0.0
docker exec -it airflow1 bash
cd
. entrypoint.sh
export AIRFLOW_HOME=/shared_dir/airflow
AIRFLOW_VERSION=2.10.3
# Extract the version of Python you have installed. If you're currently using a Python version that is not supported by Airflow, you may want to set this manually.
# See above for supported versions.
PYTHON_VERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
# For example this would install 2.10.3 with python 3.8: https://raw.githubusercontent.com/apache/airflow/constraints-2.10.3/constraints-3.8.txt
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
airflow standalone
Login with username: admin password: n6BWDMWXs9SXVPnc
AIRFLOW+POSTGRESQL
==================
docker pull postgres
docker run --name my_postgres -e POSTGRES_USER=airflow_user -e POSTGRES_PASSWORD=secure_password -e POSTGRES_DB=airflow_db -p 5432:5432 -d postgres
docker exec -it my_postgres psql -U airflow_user -d airflow_db
CELERY
=========
docker build --platform linux/arm64 -t gammaenvcelery:1.0.0 -f Dockerfile.arm.2024 .
docker run --rm -t -d -p 5555:5555 --name celery1 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v $HOME/devel/cosi:/shared_dir gammaenvcelery:1.0.0
docker exec -it celery1 bash
pip install celery flower watchdog redis
redis-server &
celery -A data_pipeline flower --port=5555 &
celery -A data_pipeline worker --loglevel=info