Now I get the expected response.
- Log in to post comments
Now I get the expected response.
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
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"]?
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)
The correct line is:
url = f"iris://_SYSTEM:SYS@localhost:1972/IRISAPP"
I need to use container internal superserver port 1972.
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
When I ask "list my csp applications", it runs a while and then it gives a nicely formatted response. Thank you, Yuri!
I see that @Guillaume Rongier has this in a Business Operation:
def on_init(self):
self.model = Ollama(base_url="http://ollama:11434",model="orca-mini")
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
)
I just submitted my new app jupyter-for-money for approval on Open Exchange.
I have submitted the form with my video.
How do we use our pass to register for InterSystems Ready 2025?
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
bilder/CaptureSendChatResp.JPG at main · oliverwilms/bilder
shows where I transfer healthcare data inside the Interoperability production
Please try online demo again.
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.
The Graph looks like this:
.png)
Here is my data:
.png)
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'
It works. Thank you, Dmitrij