You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for helping me solve my previous issue. I managed to make a Dockerfile with RTutor and it works as expected. However, I noticed something that makes it a bit counterintuitive. The launching was perfect if I added the OpenAI key using the 'settings' button on the dashboard. However, if I used an environment variable it worked a bit different to what I expected and makes it a bit more problematic to share my Dockerfile, for instance.
I first installed RTutor, then I created the OPEN_API_KEY environment variable and then launched the dashboard with RTutor::run_app(). However, all my queries failed with an error saying that probably the API key was incorrect. If I added the same API key manually, it worked. After many attempts and looking at the code for a long time, I realized that the OPEN_API_KEY environment variable could only be set up BEFORE installing the RTutor package. If I did that, it worked as expected.
It might not be considered a bug but it could be more of an enhancement. For instance, I would have liked to make a docker image that I can use with different accounts while passing the environment variable at the moment of launching the container (with docker run -e OPEN_API_KEY=<my_api_key> rtutor). However, instead, I had to add the environment variable inside my docker container so that the image itself is bound to my account. If I change accounts, I would need to change the image as well. As said, it is not per se a problem but it could be nicer that the api_key was read at the moment of launching. In any case, this behavior could at least be a bit clearer in your documentation.
Thanks again for this lovely package!
The text was updated successfully, but these errors were encountered:
An alternative method might be to mount the current folder to the container. This way, other users can save the api key in their folder when they start the docker run. The api key file is available from inside the container. docker run -v xxx:xxx rtutor
I will look into this when I have a little more time. If you find a solution, please let me know.
Thanks for helping me solve my previous issue. I managed to make a Dockerfile with RTutor and it works as expected. However, I noticed something that makes it a bit counterintuitive. The launching was perfect if I added the OpenAI key using the 'settings' button on the dashboard. However, if I used an environment variable it worked a bit different to what I expected and makes it a bit more problematic to share my Dockerfile, for instance.
I first installed RTutor, then I created the
OPEN_API_KEY
environment variable and then launched the dashboard withRTutor::run_app()
. However, all my queries failed with an error saying that probably the API key was incorrect. If I added the same API key manually, it worked. After many attempts and looking at the code for a long time, I realized that theOPEN_API_KEY
environment variable could only be set up BEFORE installing the RTutor package. If I did that, it worked as expected.It might not be considered a bug but it could be more of an enhancement. For instance, I would have liked to make a docker image that I can use with different accounts while passing the environment variable at the moment of launching the container (with
docker run -e OPEN_API_KEY=<my_api_key> rtutor
). However, instead, I had to add the environment variable inside my docker container so that the image itself is bound to my account. If I change accounts, I would need to change the image as well. As said, it is not per se a problem but it could be nicer that the api_key was read at the moment of launching. In any case, this behavior could at least be a bit clearer in your documentation.Thanks again for this lovely package!
The text was updated successfully, but these errors were encountered: