GPTDiscord: [BUG] Docker env errors with 10.3.2 + Image Size concerns

Describe the bug The docker image has grown quite a lot - Was this expected?

kaveenk/gpt3discord              latest     b4c0677089fe   15 hours ago    4.07GB

I also updated to latest_release and latest and get the following error (So I am guessing I’m 10.3.2)

Loading environment from .env
Loading environment from /opt/gpt3discord/etc/environment
Loading environment from None
Attempting to retrieve the settings DB
Retrieved the settings DB
Traceback (most recent call last):
  File "/opt/gpt3discord/bin/gpt3discord.py", line 14, in <module>
    from cogs.search_service_cog import SearchService
  File "/usr/local/lib/python3.9/site-packages/cogs/search_service_cog.py", line 13, in <module>
    ALLOWED_GUILDS = EnvService.get_allowed_guilds()
  File "/usr/local/lib/python3.9/site-packages/services/environment_service.py", line 87, in get_allowed_guilds
    allowed_guilds = [int(guild) for guild in allowed_guilds]
  File "/usr/local/lib/python3.9/site-packages/services/environment_service.py", line 87, in <listcomp>
    allowed_guilds = [int(guild) for guild in allowed_guilds]
ValueError: invalid literal for int() with base 10: ''

I’m guessing there might be config changes since I last did an update - My config:

cooper@us:/containers$ cat /containers/gpt3discord/env 
DATA_DIR="/data"

OPENAI_TOKEN="FOO"

DISCORD_TOKEN="FOO"

ALLOWED_GUILDS="811050810460078100"
ALLOWED_ROLES="Admin,gpt"
DEBUG_GUILD="811050810460078100"
DEBUG_CHANNEL="1058174617287663689"
# This is the channel that auto-moderation alerts will be sent to
MODERATIONS_ALERT_CHANNEL="1058174617287663689"

# People with the roles in ADMIN_ROLES can use admin commands like /clear-local, and etc
ADMIN_ROLES="Server Admin,Owner,Special People"
# People with the roles in DALLE_ROLES can use commands like /dalle draw or /dalle imgoptimize
DALLE_ROLES="Server Admin,Special People,@everyone"
# People with the roles in GPT_ROLES can use commands like /gpt ask or /gpt converse
GPT_ROLES="Special People,@everyone"
WELCOME_MESSAGE="Long ass message removing for paste"

Have I missed something there? I noticed in the update I got a lot more env vars send to nothing in the docker container itself - That might be the bug here resetting my ALLOWED_GUILDS? Has anyone else had an issue upgrading?

(Sadly I don’t know the version I was on but might roll back to a 9.x.x and see if i work for now)

Thanks in advance

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

Had a go at this and I think I’ve gotten it a lot better, have not had the time to test out the images yet, enable arm64 and just clean up a bit in general. image Will try and see if I can reduce it more for the full image

The size is due to torch being installed which is 2gb itself and also cuda being installed for both which is a further 1.5gb. A total 3.5gb increase

That’s quite a large increase to throw at people. Is there a summary I can see what including these large libraries give me? It’s hard to parse https://github.com/Kav-K/GPT3Discord/compare/v9.1...V10.1 and other releases as a part time visitor here …

Especially since I don’t run this on a GPU enabled box this feels wasted space to me. Can we maybe look at a fat GPU docker container and a non GPU version?