Closed cooperlees closed 1 year ago
Rolling back to 9.1 worked. Will hard pin there for now.
For reference 9.1 is only 322MB:
kaveenk/gpt3discord v9.1 9f36e3abca57 2 weeks ago 322MB
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
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?
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?
The intention was to only install the cpu versions, so I'm not too sure why there are a bunch of cuda files that have been added too alongside the cpu models. The whole dockerfile is kind of a mess atm in general
The other error you're getting is indeed because of the empty ENV's, it was added recently for some docker compose setup, but I don't think it was tested to actually run a container with that change. They can safely be removed if you're just building normally. Not sure about with compose since I didn't add it
As for what torch is required for it's for use with indexing, mostly for audio indexing with whisper. Kaveen will have to pitch in with what sentence-transformers is required for in the indexing. If you absolutely wish to save on space you can remove sentence-transformer from the requirements and also remove line 28-31 in the dockerfile. It'll only raise an importerror when trying to index a video or audio file afaik.
We could maybe them extra installs in the pyproject.toml
and publish separate containers maybe with the extra deps so people can choose via tags.
An example of the different docker container is pypi.org's mirroring software bandersnatch. It release a fllesystem only image (65MB), a S3 version (76MB) and a Swift version (106MB) due to the dependency bloat.
But anyways, size aside, I need to workout the change 10.X got for docker and didn't start for me, while 9.1 worked just fine. I use ansible to start my container as follows:
---
- name: Make Container dir
file:
path: "{{ item }}"
state: directory
recurse: yes
mode: '0775'
loop:
- /containers/gpt3discord/data
- name: Copy env config
copy:
src: env
dest: /containers/gpt3discord/env
owner: cooper
group: users
mode: '0644'
register: update_config
- name: Start gpt3discord container
docker_container:
name: gpt3discord
hostname: "{{ inventory_hostname_short }}-gpt3discord"
image: kaveenk/gpt3discord:v9.1
pull: "{{ force_docker_pull | bool }}"
state: started
network_mode: routable_net
networks:
- name: routable_net
ipv4_address: "{{ gpt3discord_ip }}"
ipv6_address: "{{ gpt3discord_ip6 }}"
networks_cli_compatible: yes
volumes:
- /containers/gpt3discord/data:/data:rw
- /containers/gpt3discord/env:/opt/gpt3discord/etc/environment:ro
restart_policy: unless-stopped
# Resource Limits
cpu_shares: 512 # default 1024
memory: 512m
There should be a way to support both needs here.
But anyways, size aside, I need to workout the change 10.X got for docker and didn't start for me, while 9.1 worked just fine. I use ansible to start my container as follows:
The breaking change is really only the extra ENV's from line 47 to line 59 in the dockerfile. I get the same error before, and it's not there after I comment them out. As I mentioned those lines were added for compose apparently in #151 and likely only tested with compose
Yes, I was the author. Let me fix these for you.
@cooperlees @Hikari-Haru
@connorv001 Thank you!
Hi Connor - Thanks for looking into this. What are you planning to do? Can we just delete the lines in the Dockerfile or does that break your compose (I've never meaningfully used docker-compose so unsure of the repercussions of deleting the env initializations in the Dockerfile causes you is all) use case? If so, I'm happy to put the PR up. I was only asking to see if could help. I just don't know how to test your specific docker-compose use case. I guess it's just using it like the documentation you added.
Hi Connor - Thanks for looking into this. What are you planning to do? Can we just delete the lines in the Dockerfile or does that break your compose (I've never meaningfully used docker-compose so unsure of the repercussions of deleting the env initializations in the Dockerfile causes you is all) use case? If so, I'm happy to put the PR up. I was only asking to see if could help. I just don't know how to test your specific docker-compose use case. I guess it's just using it like the documentation you added.
I'm planning to make multiple docker versions with different tags for differnt use cases. So that nothing in legacy doesn't get broken. I'll do so, if you want we can also work together if you want to add me on discord
Well, I tried. even using alpine look at this :
The base image in use (python:3.9-slim
) is fairly small already. We build and copy huge fat python dependencies here, so changing base image isn't going to be helpful here.
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.
Will try and see if I can reduce it more for the full image
Fixed by #169
Describe the bug The docker image has grown quite a lot - Was this expected?
I also updated to latest_release and latest and get the following error (So I am guessing I'm 10.3.2)
I'm guessing there might be config changes since I last did an update - My config:
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