这是indexloc提供的服务,不要输入任何密码
Skip to content

Add a Dockerfile for easy platform-api install #6753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Oct 8, 2024

Conversation

jmaslek
Copy link
Contributor

@jmaslek jmaslek commented Oct 8, 2024

Based off of #6749

This just adds a simple dockerfile for integrating openbb[all] with pro

@github-actions github-actions bot added the enhancement Enhancement label Oct 8, 2024
@jmaslek
Copy link
Contributor Author

jmaslek commented Oct 8, 2024

god i need to rebase lol

Copy link
Contributor

@deeleeramone deeleeramone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker works, but I'm not able to connect this in Terminal Pro.

Screenshot 2024-10-08 at 11 59 27 AM

@deeleeramone deeleeramone dismissed their stale review October 8, 2024 19:06

Need to map in Terminal as: http://localhost:6900

@deeleeramone
Copy link
Contributor

deeleeramone commented Oct 8, 2024

@jmaslek Do we want --login flag so they can add their Hub credentials?

What about the mapping to ~/.openbb_platform? - I had some out-of-order syntax when launching the container.

@jmaslek
Copy link
Contributor Author

jmaslek commented Oct 8, 2024

@jmaslek Do we want --login flag so they can add their Hub credentials?

What about the mapping to ~/.openbb_platform? - I had some out-of-order syntax when launching the container.

So I added login - good call. (And yeah you saw that the container has to map to localhost).

You can mount the image if you wanna persist anything

docker run -it -p 6900:6900 -v ~/.openbb_terminal:/app/.openbb_platform ghcr.io/openbb-finance/platform-api

@deeleeramone
Copy link
Contributor

@jmaslek Do we want --login flag so they can add their Hub credentials?
What about the mapping to ~/.openbb_platform? - I had some out-of-order syntax when launching the container.

So I added login - good call. (And yeah you saw that the container has to map to localhost).

Ok, so login does not work @jmaslek.

termios.error: (25, 'Inappropriate ioctl for device')

/usr/local/lib/python3.10/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.


Enter your personal access token (PAT) to authorize the API and update your local settings.
Skip to use a pre-configured 'user_settings.json' file.
Press Enter to skip or copy (entered values are not displayed on screen) your PAT to the command line: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/getpass.py", line 69, in unix_getpass
    old = termios.tcgetattr(fd)     # a copy to save
termios.error: (25, 'Inappropriate ioctl for device')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/openbb-api", line 5, in <module>
    from openbb_platform_api.main import main
  File "/usr/local/lib/python3.10/site-packages/openbb_platform_api/main.py", line 48, in <module>
    current_settings = get_user_settings(login, CURRENT_USER_SETTINGS, USER_SETTINGS_COPY)
  File "/usr/local/lib/python3.10/site-packages/openbb_platform_api/utils/api.py", line 83, in get_user_settings
    pat = getpass.getpass(
  File "/usr/local/lib/python3.10/getpass.py", line 91, in unix_getpass
    passwd = fallback_getpass(prompt, stream)
  File "/usr/local/lib/python3.10/getpass.py", line 126, in fallback_getpass
    return _raw_input(prompt, stream)
  File "/usr/local/lib/python3.10/getpass.py", line 148, in _raw_input
    raise EOFError
EOFError

@jmaslek
Copy link
Contributor Author

jmaslek commented Oct 8, 2024

@jmaslek Do we want --login flag so they can add their Hub credentials?
What about the mapping to ~/.openbb_platform? - I had some out-of-order syntax when launching the container.

So I added login - good call. (And yeah you saw that the container has to map to localhost).

Ok, so login does not work @jmaslek.

termios.error: (25, 'Inappropriate ioctl for device')

/usr/local/lib/python3.10/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.


Enter your personal access token (PAT) to authorize the API and update your local settings.
Skip to use a pre-configured 'user_settings.json' file.
Press Enter to skip or copy (entered values are not displayed on screen) your PAT to the command line: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/getpass.py", line 69, in unix_getpass
    old = termios.tcgetattr(fd)     # a copy to save
termios.error: (25, 'Inappropriate ioctl for device')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/openbb-api", line 5, in <module>
    from openbb_platform_api.main import main
  File "/usr/local/lib/python3.10/site-packages/openbb_platform_api/main.py", line 48, in <module>
    current_settings = get_user_settings(login, CURRENT_USER_SETTINGS, USER_SETTINGS_COPY)
  File "/usr/local/lib/python3.10/site-packages/openbb_platform_api/utils/api.py", line 83, in get_user_settings
    pat = getpass.getpass(
  File "/usr/local/lib/python3.10/getpass.py", line 91, in unix_getpass
    passwd = fallback_getpass(prompt, stream)
  File "/usr/local/lib/python3.10/getpass.py", line 126, in fallback_getpass
    return _raw_input(prompt, stream)
  File "/usr/local/lib/python3.10/getpass.py", line 148, in _raw_input
    raise EOFError
EOFError

Gonna need more info -- can't reproduce. Looks like potentially an issue with something in the json. What did you run ?

Screenshot 2024-10-08 at 3 35 12 PM

@deeleeramone
Copy link
Contributor

Gonna need more info -- can't reproduce. Looks like potentially an issue with something in the json. What did you run ?

lol. I can't reproduce anymore either..

@deeleeramone deeleeramone added this pull request to the merge queue Oct 8, 2024
Merged via the queue into develop with commit 3605af3 Oct 8, 2024
6 checks passed
@piiq piiq deleted the feature/platform-api-docker branch October 18, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants