Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable dark frame capture in containers #1061

Merged
merged 5 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ https://github.com/aaronwmorris/indi-allsky/wiki/FAQ
## INDI support
| Version | Note |
| --------------- | ---- |
| v2.0.5 | Requires upgrade to indi-allsky v7.7 |
| v2.0.5 | **Recommended**<br>Requires upgrade to indi-allsky v7.7 |
| v2.0.4 | [Typo in indibash.h prevents building pyindi-client](https://github.com/aaronwmorris/indi-allsky/wiki/INDI-2.0.4-bug)<br>Svbony support is broken |
| v2.0.3 | **Recommended** |
| v2.0.3 | |
| v2.0.2 | |
| v2.0.1 | |

Expand Down
17 changes: 12 additions & 5 deletions docker/env_template
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ INDIALLSKY_INDI_GPS_DRIVER=
# This folder needs to be shared to the capture, gunicorn, and nginx containers
INDIALLSKY_IMAGE_FOLDER=/var/www/html/allsky/images

INDIALLSKY_FLASK_AUTH_ALL_VIEWS=false
INDIALLSKY_FLASK_SECRET_KEY=%INDIALLSKY_FLASK_SECRET_KEY%
INDIALLSKY_FLASK_PASSWORD_KEY=%INDIALLSKY_FLASK_PASSWORD_KEY%
# Set to "true" (without quotes) to take dark frames instead of normal image capture
INDIALLSKY_DARK_CAPTURE_ENABLE=false
INDIALLSKY_DARK_CAPTURE_MODE=sigmaclip
INDIALLSKY_DARK_CAPTURE_BITMAX=16
INDIALLSKY_DARK_CAPTURE_DAYTIME=--daytime

# Folder for temporary files in capture process. Uncomment to activate
#CAPTURE_TMPDIR=/tmp

INDIALLSKY_FLASK_AUTH_ALL_VIEWS=false
INDIALLSKY_FLASK_SECRET_KEY=%INDIALLSKY_FLASK_SECRET_KEY%
INDIALLSKY_FLASK_PASSWORD_KEY=%INDIALLSKY_FLASK_PASSWORD_KEY%

INDIALLSKY_WEB_USER=%WEB_USER%
INDIALLSKY_WEB_PASS=%WEB_PASS%
INDIALLSKY_WEB_NAME=%WEB_NAME%
Expand All @@ -25,11 +31,12 @@ INDIALLSKY_WEB_EMAIL=%WEB_EMAIL%
INDIALLSKY_MOSQUITTO_USER=%WEB_USER%
INDIALLSKY_MOSQUITTO_PASS=%WEB_PASS%

# remember to set back to false after first run
# Set to "true" (without quotes) to generate a users API key
# remember to set back to "false" after first run
INDIALLSKY_WEB_GENERATE_APIKEY=false

# Only used on the debian build
INDIALLSKY_INDI_VERSION=v2.0.3
INDIALLSKY_INDI_VERSION=v2.0.5
INDIALLSKY_LIBCAMERA_TAG=HEAD
INDIALLSKY_RPICAM_APPS_TAG=HEAD

Expand Down
5 changes: 5 additions & 0 deletions docker/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ cd "$OLDPWD"


if [ ! -f "${DOCKER_DIRECTORY}/.env" ]; then
sudo true
sudo apt-get update
sudo apt-get -f install \
python3-cryptography


INDIALLSKY_FLASK_SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())')
INDIALLSKY_FLASK_PASSWORD_KEY=$(python3 -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())')
Expand Down
16 changes: 13 additions & 3 deletions docker/start_indi_allsky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,17 @@ fi


# start the program
./allsky.py \
--log stderr \
run

if [ "${INDIALLSKY_DARK_CAPTURE_ENABLE:-false}" == "true" ]; then
# take dark frames
echo "*** Starting dark frame capture ***"
./darks.py \
--bitmax "${INDIALLSKY_DARK_CAPTURE_BITMAX:-16}" \
"${INDIALLSKY_DARK_CAPTURE_DAYTIME:-}" \
"${INDIALLSKY_DARK_CAPTURE_MODE:-average}"
else
# normal capture
./allsky.py \
--log stderr \
run
fi
2 changes: 1 addition & 1 deletion misc/build_indi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -n "${1:-}" ]; then
INDI_CORE_TAG="$1"
INDI_3RDPARTY_TAG=$INDI_CORE_TAG
else
INDI_CORE_TAG="v2.0.3"
INDI_CORE_TAG="v2.0.5"
INDI_3RDPARTY_TAG=$INDI_CORE_TAG
fi

Expand Down
4 changes: 3 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ WEB_PASS="${INDIALLSKY_WEB_PASS:-}"
WEB_NAME="${INDIALLSKY_WEB_NAME:-}"
WEB_EMAIL="${INDIALLSKY_WEB_EMAIL:-}"

OPTIONAL_PYTHON_MODULES="${INDIALLSKY_OPTIONAL_PYTHON_MODULES:-false}"

PYINDI_2_0_4="git+https://github.com/indilib/pyindi-client.git@6f8fa80#egg=pyindi-client"
PYINDI_2_0_0="git+https://github.com/indilib/pyindi-client.git@674706f#egg=pyindi-client"
PYINDI_1_9_9="git+https://github.com/indilib/pyindi-client.git@ce808b7#egg=pyindi-client"
Expand Down Expand Up @@ -1893,7 +1895,7 @@ pip3 install --upgrade pip setuptools wheel
pip3 install -r "${ALLSKY_DIRECTORY}/${VIRTUALENV_REQ}"


if [ -n "${OPTIONAL_PYTHON_MODULES:-}" ]; then
if [ "${OPTIONAL_PYTHON_MODULES}" == "true" ]; then
pip3 install -r "${ALLSKY_DIRECTORY}/${VIRTUALENV_REQ_OPT}"
fi

Expand Down