-
Notifications
You must be signed in to change notification settings - Fork 7
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
sylvain-morin
authored and
sylvain-morin
committed
Dec 21, 2023
1 parent
430cbb0
commit d3dd6cb
Showing
8 changed files
with
106 additions
and
6 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 |
---|---|---|
|
@@ -3,3 +3,4 @@ log/* | |
static/* | ||
venv | ||
config.yml | ||
models |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM alpine:latest | ||
|
||
RUN apk add --no-cache logrotate | ||
|
||
RUN mkdir -p /var/vision/log | ||
RUN mkdir -p /var/vision/static | ||
RUN mkdir -p /var/vision/script | ||
|
||
# Configure logrotate hourly | ||
COPY docker/logrotate.conf /var/vision/script/logrotate.conf | ||
COPY docker/logrotate-cron.sh /var/vision/script/logrotate-cron.sh | ||
RUN chmod 400 /var/vision/script/logrotate.conf | ||
RUN crontab -l | { cat; echo "0 * * * * sh /var/vision/script/logrotate-cron.sh"; } | crontab - | ||
|
||
# Configure job to clean static folder | ||
COPY docker/clean-static-cron.sh /var/vision/script/clean-static-cron.sh | ||
RUN crontab -l | { cat; echo "*/10 * * * * sh /var/vision/script/clean-static-cron.sh"; } | crontab - | ||
|
||
# Run cron | ||
CMD ["/bin/sh", "-c", "crond -f"] |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
find /var/vision/static -type f -mmin +10 -exec rm {} \; |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
/usr/sbin/logrotate -s /var/vision/script/logrotate.status /var/vision/script/logrotate.conf |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/var/vision/log/logstash.log { | ||
hourly | ||
rotate 5 | ||
size 10M | ||
missingok | ||
compress | ||
delaycompress | ||
notifempty | ||
copytruncate | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[uwsgi] | ||
wsgi-file = /home/inaturalist/vision/app.py | ||
protocol = uwsgi | ||
callable = app | ||
chmod-socket = 777 | ||
socket= :8888 | ||
#socket = /home/inaturalist/vision/uwsgi/socket | ||
master = true | ||
lazy-apps = true | ||
processes = 1 | ||
threads = 1 | ||
uid = www-data | ||
gid = www-data | ||
skip-atexit = true | ||
skip-atexit-teardown = true |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
flake8 | ||
Flask | ||
Flask-WTF | ||
h3 | ||
h3pandas | ||
itsdangerous | ||
jinja2 | ||
keras | ||
matplotlib | ||
numpy | ||
pandas | ||
Pillow | ||
prison | ||
python-magic | ||
pyyaml | ||
scikit_learn | ||
scipy | ||
six | ||
tensorflow | ||
tifffile | ||
umap_learn | ||
uWSGI | ||
werkzeug | ||
WTForms | ||
#-f https://download.pytorch.org/whl/torch_stable.html | ||
#torch==2.1.0+cpu |