I have commented out the Tests line in Dockerfile. I am still not able to have dependency for isc.rest or isc-rest.

def verify_chain(signer_cert, ca_bundle_path): """Verify that the signer certificate chains up to a trusted CA in the bundle.""" # Load trusted CAs ca_store = crypto.X509Store()

with open(ca_bundle_path, "rb") as f:
    pem_data = f.read()

# Split bundle into individual certs
for chunk in pem_data.split(b"-----END CERTIFICATE-----"):
    block = chunk.strip()
    if not block:
        continue
    block += b"\n-----END CERTIFICATE-----\n"
    try:
        ca = crypto.load_certificate(crypto.FILETYPE_PEM, block)
        ca_store.add_cert(ca)
    except Exception:
        # Skip things that aren't PEMs
        continue

# Convert cryptography.x509.Certificate -> OpenSSL.crypto.X509
signer_pem = signer_cert.public_bytes(encoding=serialization.Encoding.PEM)
signer_x509 = crypto.load_certificate(crypto.FILETYPE_PEM, signer_pem)

# Now verify
store_ctx = crypto.X509StoreContext(ca_store, signer_x509)
try:
    store_ctx.verify_certificate()
    print("✔ Certificate chain validation passed.")
except Exception as e:
    raise ValueError(f"Certificate chain validation failed: {e}")

I was able to use the LoadCertificate() method. I am working on converting python code to ObjectScript.

Enrico, I got a python script for SAML Assertion Validation. I want to convert it to ObjectScript. I am working on Certificate Chain and Signature validation. I have a certificate bundle in a crt file. I will save the certificates to individual files and then use management portal or a class method to configure or import into IRIS.

Oliver Wilms · Sep 8, 2025 go to post

This line in plotly.py generates a dataframe:

df = iris.sql.exec(query).dataframe()

where query = "SELECT Top 10 Category, Credit, Debit, TrnCount FROM dc_iris.trncount where TrnYear=2025 and TrnMonth=8 Order By Debit DESC"

The bars in the graph reflect rows 0 to 9, not the amount in 'Debit'

Oliver Wilms · May 29, 2025 go to post

Collect 4 bonus points if your application is a healthcare interoperability solution that uses InterSystems Interoperability to transfer or/and transform healthcare data via messages or it uses healthcare format data transformation.

I transfer healthcare data. It did not say I have to use HealthShare formats.

Oliver Wilms · May 29, 2025 go to post

I believe ollama-ai-iris qualifies for Digital Health Interoperability - 4 points

Collect 4 bonus points if your application is a healthcare interoperability solution that uses InterSystems Interoperability to transfer or/and transform healthcare data via messages or it uses healthcare format data transformation.

Also, I have online demo linked in ReadMe

Oliver Wilms · May 4, 2025 go to post

I just submitted my new app jupyter-for-money for approval on Open Exchange.

Oliver Wilms · Apr 27, 2025 go to post

I was able to connect to ollama with this:

Settings.llm = Ollama(
     base_url="http://ollama:11434", # tell it to connect to the Ollama container
     model="llama3.2",
     request_timeout=360.0
 )

Oliver Wilms · Apr 21, 2025 go to post

When I ask "list my csp applications", it runs a while and then it gives a nicely formatted response. Thank you, Yuri!

Oliver Wilms · Apr 21, 2025 go to post

Hi, Yuri. I cloned your repo again, built images and deployed it in AWS EC2. I went to IRIS Tool Chat and entered this query: list my namespaces

It ran a while and then I got this response: Error performing Intersystems IRIS operation: Unsupported operation: list_namespaces

Oliver Wilms · Apr 20, 2025 go to post

The correct line is:

url = f"iris://_SYSTEM:SYS@localhost:1972/IRISAPP"

I need to use container internal superserver port 1972.

Oliver Wilms · Apr 20, 2025 go to post

I think I interpreted data correctly and I am using superserver port.

irisowner@e10968e4da42:/irisdev/app$ python3 test_conn.py
Traceback (most recent call last):
  File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/dbapi/_DBAPI.py", line 50, in connect
    return native_connect(
           ^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_IRISNative.py", line 183, in connect
    connection._connect(hostname, port, namespace, username, password, timeout, sharedmemory, logfile, sslcontext, autoCommit, isolationLevel, featureOptions, application_name)
  File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_IRISConnection.py", line 304, in _connect
    raise e
  File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_IRISConnection.py", line 203, in _connect
    self._device.connect(server_address)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_Device.py", line 31, in connect
    return self._socket.connect(server_address)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
    self._dbapi_connection = engine.raw_connection()
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3298, in raw_connection
    return self.pool.connect()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect
    return _ConnectionFairy._checkout(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1264, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 713, in checkout
    rec = pool._do_get()
          ^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 179, in _do_get
    with util.safe_reraise():
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get
    return self._create_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
    return _ConnectionRecord(self)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 675, in __init__
    self.__connect()
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 901, in __connect
    with util.safe_reraise():
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 897, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 646, in connect
    return dialect.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 625, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)  # type: ignore[no-any-return]  # NOQA: E501
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/dbapi/_DBAPI.py", line 58, in connect
    raise OperationalError(e)
intersystems_iris.dbapi._DBAPI.OperationalError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/irisdev/app/test_conn.py", line 5, in <module>
    with engine.connect() as conn:
         ^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3274, in connect
    return self._connection_cls(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 148, in __init__
    Connection._handle_dbapi_exception_noconnection(
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2439, in _handle_dbapi_exception_noconnection
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
    self._dbapi_connection = engine.raw_connection()
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3298, in raw_connection
    return self.pool.connect()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect
    return _ConnectionFairy._checkout(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1264, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 713, in checkout
    rec = pool._do_get()
          ^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 179, in _do_get
    with util.safe_reraise():
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get
    return self._create_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
    return _ConnectionRecord(self)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 675, in __init__
    self.__connect()
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 901, in __connect
    with util.safe_reraise():
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 897, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 646, in connect
    return dialect.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 625, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)  # type: ignore[no-any-return]  # NOQA: E501
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/dbapi/_DBAPI.py", line 58, in connect
    raise OperationalError(e)
sqlalchemy.exc.OperationalError: (intersystems_iris.dbapi._DBAPI.OperationalError) [Errno 111] Connection refused
(Background on this error at: https://sqlalche.me/e/20/e3q8)

Oliver Wilms · Apr 20, 2025 go to post

I have tried the docker prune and rebuilt and deployed the app. It is still not working. I wonder if it matters that the entrypoint was changed from entrypoint: ["/bin/sh", "/model_files/run_ollama.sh"] to  entrypoint: ["/usr/bin/bash", "/model_files/run_ollama.sh"]?

Oliver Wilms · Apr 19, 2025 go to post

Yes, it is:

services:
  iris:
    build: 
      context: .
      dockerfile: Dockerfile
    restart: always
    expose:
      - 8501
    ports: 
      - 51972:1972
      - 53795:52773
      - 53773
    networks:
      - iris-llm2-network
    volumes:
      - ./:/irisdev/app
      - ./init.sh:/docker-entrypoint-initdb.d/init.sh
  ollama:
    image: ollama/ollama:latest
    ports:
      - 11434:11434
    volumes:
      - ./model_files:/model_files
      - .:/code
      - ./ollama:/root/.ollama
    container_name: ollama
    pull_policy: always
    tty: true
    restart: always
    entrypoint: ["/usr/bin/bash", "/model_files/run_ollama.sh"]
    networks:
      - iris-llm2-network
#  ollama:
#    image: ollama/ollama:latest
#    deploy:
#      resources:
#        reservations:
#          devices:
#          - driver: nvidia
#            capabilities: ["gpu"]
#            count: all  # Adjust count for the number of GPUs you want to use
#    ports:
#      - 11434:11434
#    volumes:
#      - ./model_files:/model_files 
#      - .:/code
#      - ./ollama:/root/.ollama
#    container_name: ollama_iris
#    pull_policy: always
#    tty: true
#    entrypoint: ["/bin/sh", "/model_files/run_ollama.sh"] # Loading the finetuned Mistral with the GGUF file
#    restart: always
#    environment:
#      - OLLAMA_KEEP_ALIVE=24h
#      - OLLAMA_HOST=0.0.0.0
#    networks:
#      - iris-llm2-network

  
  streamlit:
    build:
      context: ./
      dockerfile: ./streamlit/Dockerfile
    #stdin_open: true # docker run -i
    #tty: true 
    #entrypoint: /bin/sh
    command: streamlit run /usr/src/app/Menu.py --server.port 8501
    volumes:
      - ./src/python/rag:/usr/src/app
    expose: [8501]
    ports:
      - 8501:8501
    image: yourstreamlitapp:latest 
    networks:
      - iris-llm2-network
        
networks:
  iris-llm2-network:
    driver: bridge

Oliver Wilms · Apr 4, 2025 go to post

I see there is a discrepancy between the resource and the Application role. I need to remove extra percent sign.