Skip to content
Snippets Groups Projects
Unverified Commit 223d96dc authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Add new swh-loader-package application

This deals with package loaders only: pypi, npm, maven, opam, ...

Related to T4144
parent 9196f22c
No related branches found
No related tags found
No related merge requests found
# Deeply inspired from the Dockerfile of the swh-graph project
FROM python:3.10-bullseye
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install -y libcmph-dev librdkafka-dev && \
apt clean && \
addgroup --gid 1000 swh && \
useradd --gid 1000 --uid 1000 -m -d /opt/swh swh && \
mkdir /etc/swh
USER swh
WORKDIR /opt/swh
COPY --chown=swh:swh requirements-frozen.txt /opt/swh
COPY --chown=swh:swh entrypoint.sh /opt/swh
ENV PYTHONPATH=/opt/swh
ENV PATH=/opt/swh/.local/bin:$PATH
RUN chmod u+x /opt/swh/entrypoint.sh && \
/usr/local/bin/python -m pip install --upgrade pip && \
pip install --no-cache-dir -r requirements-frozen.txt && \
pip install gunicorn
ENV SWH_CONFIG_FILENAME=/etc/swh/config.yml
ENV SWH_WORKER_INSTANCE=loader
ENV CONCURRENCY=1
ENV MAX_TASKS_PER_CHILD=5
ENV LOGLEVEL=INFO
ENTRYPOINT "/opt/swh/entrypoint.sh"
#!/bin/bash
set -e
case "$1" in
"shell")
shift
echo "Running command $@"
exec bash -i "$@"
;;
*)
echo Starting the swh Celery worker for ${SWH_WORKER_INSTANCE}
exec python -m celery \
--app=swh.scheduler.celery_backend.config.app \
worker \
--pool=prefork --events \
--concurrency=${CONCURRENCY} \
--max-tasks-per-child=${MAX_TASKS_PER_CHILD} \
-Ofair --loglevel=${LOGLEVEL} \
--without-gossip --without-mingle --without-heartbeat \
--hostname "${SWH_WORKER_INSTANCE}@%h"
;;
esac
aiohttp==3.8.1
aiohttp-utils==3.1.1
aiosignal==1.2.0
amqp==5.1.1
async-timeout==4.0.2
attrs==22.1.0
attrs-strict==1.0.0
billiard==3.6.4.0
blinker==1.5
cassandra-driver==3.25.0
celery==5.2.7
certifi==2022.6.15
cffi==1.15.1
chardet==5.0.0
charset-normalizer==2.1.1
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
confluent-kafka==1.9.2
Deprecated==1.2.13
exceptiongroup==1.0.0rc9
Flask==2.2.2
frozenlist==1.3.1
geomet==0.2.1.post1
gunicorn==20.1.0
humanize==4.3.0
hypothesis==6.54.5
idna==3.3
importlib-metadata==4.12.0
iniconfig==1.1.1
iso8601==1.0.2
itsdangerous==2.1.2
Jinja2==3.1.2
kombu==5.2.4
MarkupSafe==2.1.1
mirakuru==2.4.2
msgpack==1.0.4
multidict==6.0.2
mypy-extensions==0.4.3
packaging==21.3
pika==1.3.0
pkginfo==1.8.3
pluggy==1.0.0
port-for==0.6.2
prompt-toolkit==3.0.31
psutil==5.9.2
psycopg2==2.9.3
py==1.11.0
pycparser==2.21
pyparsing==3.0.9
pytest==7.1.3
pytest-postgresql==3.1.3
python-dateutil==2.8.2
python-debian==0.1.47
python-magic==0.4.27
python-mimeparse==1.6.0
pytz==2022.2.1
PyYAML==6.0
redis==4.3.4
requests==2.28.1
sentry-sdk==1.9.8
six==1.16.0
sortedcontainers==2.4.0
swh.core==2.14.0
swh.counters==0.9.1
swh.journal==1.1.0
swh.loader.core==3.5.0
swh.model==6.4.1
swh.objstorage==2.0.1
swh.perfecthash==0.1.2
swh.scheduler==1.2.1
swh.storage==1.6.0
tenacity==8.0.1
toml==0.10.2
tomli==2.0.1
typing_extensions==4.3.0
urllib3==1.26.12
vine==5.0.0
wcwidth==0.2.5
Werkzeug==2.2.2
wrapt==1.14.1
yarl==1.8.1
zipp==3.8.1
swh-loader-core
  • Phabricator Migration user @phabricator-migration ·
    Owner

    Some references in the commit message have been migrated:

    • T4144 is now infra/sysadm-environment#4144
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment