Adding local Dependency to the streamlit

Ask the community or our support engineers for answers to questions.
Hi all,

I have streamlit application ,

  1. I am depending on local applications like installed oracle in particular machine

How i can deploy with this dependency.

2nd question i have is
I have code in github , How i can run streamlit , So that it will pickup code from github.

Hello @Naveen_Bhaskar, welcome to the forum :partying_face:

This is actually how Streamlit Share works, it deploys your app through Github and will redeploy anytime you push to your repository. Have a look at the blog post and then you can go request an invite.

This will depend on the type of dependencies you are handling:

  • If adding Python dependencies, those you usually install with pip install or conda install then you will write them inside a requirements.txt file in your repo and Streamlit Share will install them for you (documentation)
  • If adding apt-get dependencies, those you usually install with apt-get install and which are generally packages to support Python deps like libasound-dev for PyAudio or firefox-esr for selenium; and Streamlit Share will install them for you (documentation)
    • What do you mean by installed oracle in particular machine ? You will not be able to install and run a Oracle DB inside the Streamlit Share container, you will have no control over how to run custom packages on your deployed app. You could host your Oracle DB somewhere else and have Streamlit connect to the remote Oracle instead.

Have a nice day!
Fanilo :balloon:

Thanks andfanilo for your reply.

  1. Regarding github ( If i am not planning to deploy because of oracle dependency)
    - I am coding in one machine and updating in github
    - In another machine it should pickup the code and run streamlit app

  2. Regarding oracle (because i am completely new how to avoid dependencies)
    - need to install oracle client library and connect to oracle with ip address using cx_oracle ( is it take care by streamlit deploy)
    - one more is i am in private environment So planning to use one of my machine as deployment place, So that it will take care.

But how to do is the question i have, Thanks in advance for your help.

I will go through provided documents and will try to find more information.

Thanks

Sorry I may have minsunderstood some of your questions and am not totally sure of the end result you expect, don’t hesitate to correct me :slight_smile:

Sharing a Streamlit app over the web will be taken care of by Streamlit Share, for example here is my Streamlit app that depends on code from this Github repo. Every time I push on this repo the app on the URL will be updated. You can also see in this repo a requirements.txt and a packages.txt to install dependencies for the app,

Seeing the installation guide for Oracle client for example you will put cx_oracle in requirements.txt and the Oracle client library in packages.txt.

  • From a quick look, I’m not sure there is an apt package for Oracle client :confused: ?
  • There’s also a Conda Oracle Instant client package so maybe you should install everything through Conda instead with the environment.yml file…I have to admit we’ll need to take a closer look at this one.

Beware, the Streamlit Share app is publicly deployed in the Cloud, you won’t have private deploys or deployments to your on-premise private environment (that may be included in Streamlit For Teams).

You will need to find a way to authorize connections from Streamlit Share URL to your private Oracle environment. I remember seeing a way of doing this in the forum but we’d need to dig deeply…

Fanilo