# See the License for the specific language governing permissions and
# limitations under the License.
# ==================================================================================
-FROM frolvlad/alpine-miniconda3:python3.7
+#Python 3.11 miniconda
+FROM continuumio/miniconda3:23.10.0-1
+
# RMR setup
RUN mkdir -p /opt/route/
-# copy rmr files from builder image in lieu of an Alpine package
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.5 /usr/local/lib64/librmr* /usr/local/lib64/
+# sdl uses hiredis which needs gcc
+RUN apt update && apt install -y gcc musl-dev
+
+# copy rmr libraries from builder image in lieu of an Alpine package
+ARG RMRVERSION=4.9.0
+RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr_${RMRVERSION}_amd64.deb
+RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb
+RUN rm -f rmr_${RMRVERSION}_amd64.deb rmr-dev_${RMRVERSION}_amd64.deb
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.5 /usr/local/bin/rmr* /usr/local/bin/
ENV LD_LIBRARY_PATH /usr/local/lib/:/usr/local/lib64
+ENV C_INCLUDE_PATH /usr/local/include
COPY local.rt /opt/route/local.rt
ENV RMR_SEED_RT /opt/route/local.rt
-RUN apk update && apk add gcc musl-dev
-
# Install
COPY setup.py /tmp
COPY LICENSE.txt /tmp/
# RUN mkdir -p /tmp/ad/
RUN pip install /tmp
RUN pip install ricxappframe
-RUN pip install --force-reinstall redis==3.0.1
ENV PYTHONUNBUFFERED 1
+ENV CONFIG_FILE /opt/ric/config/config-file.json
COPY src/ /src
-CMD PYTHONPATH=/src:/usr/lib/python3.7/site-packages/:$PYTHONPATH run-src.py
+CMD PYTHONPATH=/src:/usr/lib/python3.11/site-packages/:$PYTHONPATH run-src.py
# See the License for the specific language governing permissions and
# limitations under the License.
# ==================================================================================
-
-FROM frolvlad/alpine-miniconda3:python3.7
-# FROM python:3.8-alpine
+#Python 3.11 miniconda
+FROM continuumio/miniconda3:23.10.0-1
# RMR setup
RUN mkdir -p /opt/route/
# sdl uses hiredis which needs gcc
-RUN apk update && apk add gcc musl-dev
+RUN apt update && apt install -y gcc musl-dev
# copy rmr libraries from builder image in lieu of an Alpine package
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.5 /usr/local/lib64/librmr* /usr/local/lib64/
+ARG RMRVERSION=4.9.0
+RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr_${RMRVERSION}_amd64.deb
+RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb
+RUN rm -f rmr_${RMRVERSION}_amd64.deb rmr-dev_${RMRVERSION}_amd64.deb
# Upgrade pip, install tox
RUN pip install --upgrade pip && pip install tox
-RUN apk update && apk add gcc musl-dev
# copies
COPY setup.py tox.ini LICENSE.txt /tmp/
COPY src/ /tmp/src
COPY tests/ /tmp/tests
# Run the unit tests
-WORKDIR /tmp
-RUN PYTHONPATH=/tmp/src:/usr/lib/python3.7/site-packages/:$PYTHONPATH tox -e code,flake8
+WORKDIR /tmp
+RUN PYTHONPATH=/tmp/src:/usr/lib/python3.11/site-packages/:$PYTHONPATH tox -e code,flake8
The format is based on `Keep a Changelog <http://keepachangelog.com/>`__
and this project adheres to `Semantic Versioning <http://semver.org/>`__.
+[1.0.2] - 2023-12-12
+--------------------
+* Release version 1.0.2 (`RICAPP-229 <https://jira.o-ran-sc.org/browse/RICAPP-229>`_)
+
[1.0.1] - 2023-06-28
--------------------
* Release version 1.0.1 (`RICAPP-215 <https://jira.o-ran-sc.org/browse/RICAPP-215>`_)
newrt|start
-rte|30003|service-ricxapp-trafficxapp-rmr:4560
+rte|30003|service-ricxapp-trafficxapp-rmr.ricxapp:4560
rte|20011|service-ricplt-a1mediator-rmr.ricplt:4560
newrt|end
# CI script installs RMR from PackageCloud using this version
---
-version: 4.0.5
+version: 4.9.0
packages=find_packages(exclude=["tests.*", "tests"]),
description="Anomaly Detection xApp that integrates with Traffic Steering",
url="https://gerrit.o-ran-sc.org/r/admin/repos/ric-app/ad",
- install_requires=["ricxappframe>=1.1.1,<2.0.0", "pandas>=1.1.3", "joblib>=0.3.2", "Scikit-learn>=0.18", "mdclogpy<=1.1.1", "schedule>=0.0.0", "influxdb"],
+ install_requires=["ricxappframe==3.2.2", "pandas>=1.1.3", "joblib>=0.3.2", "Scikit-learn>=0.18", "mdclogpy<=1.1.1", "schedule>=0.0.0", "influxdb"],
entry_points={"console_scripts": ["run-src.py=src.main:start"]}, # adds a magical entrypoint for Docker
license="Apache 2.0",
data_files=[("", ["LICENSE.txt"])],
# ==================================================================================
[influxdb]
-host = ricplt-influxdb.ricplt
+host = ricplt-influxdb.ricplt
port = 8086
user = admin
password =
sample.loc[i, 'Degradation'] = deg
if 'Throughput' in deg and ('RSRP' in deg or 'RSRQ' in deg):
sample.loc[i, 'Anomaly'] = 2
+ else:
+ sample.loc[i, 'Anomaly'] = 1
else:
sample.loc[i, 'Anomaly'] = 0
return sample[['Anomaly', 'Degradation']].values.tolist()
self.config()
self.connect()
# self.dropdb('RIC-Test')
-# self.createdb('RIC-Test')
+ self.createdb('RIC-Test')
def config(self):
cfg = ConfigParser()
self.meas = cfg.get(section, "measurement")
def createdb(self, dbname):
- print("Create database: " + dbname)
- self.client.create_database(dbname)
- self.client.switch_database(dbname)
+ if dbname not in self.client.get_list_database():
+ print("Create database: " + dbname)
+ self.client.create_database(dbname)
+ self.client.switch_database(dbname)
def dropdb(self, dbname):
- print("DROP database: " + dbname)
- self.client.drop_database(dbname)
+ if next((item for item in self.client.get_list_database() if item.get("name") == dbname), None) is not None:
+ print("DROP database: " + dbname)
+ self.client.drop_database(dbname)
def dropmeas(self, measname):
print("DROP MEASUREMENT: " + measname)
{
- "xapp_name": "ad",
- "version": "1.0.1",
+ "name": "ad",
+ "version": "1.0.2",
"containers": [
{
"name": "ad",
],
"messaging": {
"ports": [
+ {
+ "name": "http",
+ "container": "ad",
+ "port": 8080,
+ "description": "http service"
+ },
{
"name": "rmr-data",
"container": "ad",