From 9e60ea592d2eb7132c9176f54416bda47dbe857c Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Mon, 14 Sep 2020 13:04:42 -0400 Subject: [PATCH] Move agent requirements to specific Agent directories --- Dockerfile | 2 +- agents/influxdb_publisher/Dockerfile | 3 +++ agents/influxdb_publisher/requirements.txt | 1 + docs/user/dependencies.rst | 3 --- docs/user/installation.rst | 2 +- requirements/agents.txt | 4 ---- requirements/dev.txt | 1 - 7 files changed, 6 insertions(+), 10 deletions(-) create mode 100644 agents/influxdb_publisher/requirements.txt delete mode 100644 requirements/agents.txt diff --git a/Dockerfile b/Dockerfile index 1502032d..486cd29d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,5 +25,5 @@ COPY . /app/ocs/ WORKDIR /app/ocs/ # Install ocs -RUN pip3 install -r requirements.txt && \ +RUN pip3 install -r requirements/dev.txt && \ pip3 install -e . diff --git a/agents/influxdb_publisher/Dockerfile b/agents/influxdb_publisher/Dockerfile index e6c43e2d..f0bbbf12 100644 --- a/agents/influxdb_publisher/Dockerfile +++ b/agents/influxdb_publisher/Dockerfile @@ -8,6 +8,9 @@ FROM ocs:latest WORKDIR /app/ocs/agents/influxdb_publisher/ COPY influxdb_publisher.py . +COPY requirements.txt . + +RUN pip3 install -r requirements.txt # Run publisher on container startup ENTRYPOINT ["python3", "-u", "influxdb_publisher.py"] diff --git a/agents/influxdb_publisher/requirements.txt b/agents/influxdb_publisher/requirements.txt new file mode 100644 index 00000000..30775bb6 --- /dev/null +++ b/agents/influxdb_publisher/requirements.txt @@ -0,0 +1 @@ +influxdb diff --git a/docs/user/dependencies.rst b/docs/user/dependencies.rst index d9d0e5d7..907cb075 100644 --- a/docs/user/dependencies.rst +++ b/docs/user/dependencies.rst @@ -29,9 +29,6 @@ which refers to ``requirements.txt``, and is covered in the next page. Other dependencies must be explitly installed. For convenience these are split into groups based on various tasks OCS users might want to accomplish. -* ``agents.txt`` - Dependencies for running OCS Agents on a host system. Most - commonly Agents will be run in Docker containers, which come with the - required dependencies already installed. * ``crossbar.txt`` - The crossbar server and any dependencies it might have. This pulls in a lot of other python packages, some of which conflict with other dependencies in OCS. We strongly encourage using the crossbar Docker diff --git a/docs/user/installation.rst b/docs/user/installation.rst index f1a5a81a..aef1edcc 100644 --- a/docs/user/installation.rst +++ b/docs/user/installation.rst @@ -73,6 +73,6 @@ To install, clone the repository and use pip to install:: additional dependnecies listed in the files within ``requirements/``. You can do so using pip. For example:: - pip3 install -r requirements/agents.txt + pip3 install -r requirements/dev.txt .. _Docker Compose: https://docs.docker.com/compose/install/ diff --git a/requirements/agents.txt b/requirements/agents.txt deleted file mode 100644 index 7239ea38..00000000 --- a/requirements/agents.txt +++ /dev/null @@ -1,4 +0,0 @@ --r clients.txt - -# InfluxDB Publisher -influxdb diff --git a/requirements/dev.txt b/requirements/dev.txt index 37be885c..450a45e2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,4 +1,3 @@ --r agents.txt -r clients.txt -r docs.txt