Docker internal changes #104
Replies: 22 comments 97 replies
-
I think this is a great idea. Thank you! Should we close #59? I may have found something. Docker desktop says, that this layer is 978.22 MB. Command:
However, I looked at all the packages with dependencies, based on the spacy documentation's Dependencies section, and it does not add up. ja_core_news_sm 11MB SudachiPy ~3MB All added together: 279MB Is it 3 times larger because the download size is compressed, or is there something to save? I found this, maybe it would save some space. |
Beta Was this translation helpful? Give feedback.
-
Maybe we could also merge the two containers together? The only benefit of having them separated is that Python does the majority of CPU intensive work, so it would be easy to have multiple python servers and one php. But I don't think it will ever have so many users that it will matter, and we can always separate them again. |
Beta Was this translation helpful? Give feedback.
-
I will add these 2 libraries to python for v0.7: They don't seem to take up a large space. Edit: I was wrong, it did go up to 1.37 GB, I think it was 1.29GB before. I think it will be necessary to have an image where we allow enabling languages in a .env file, and only install missing python libraries at startup that the enabled languages need. Otherwise the python library will go over 2GB if I add other language models, other tokenizers for uncommon languages and OCR for manga reader. It's impossible to keep the image size low, and add all the features at the same time. Will get even worse if generative AI gets better, text to speech is already seems to getting to an acceptable helpful level. I'm not sure what is the solution. I also don't think that I want to make users download and/or install these large libraries, if they only want the basic features. (These are not important in the next few weeks/months, just some thoughts.) |
Beta Was this translation helpful? Give feedback.
-
On the topic of future possible features, I have been thinking if adding a RSS feed as a "book" where each entry in the feed is a "chapter" would be fitting since part of the recommended material are news feeds. FreshRSS is less than 80MB compressed and is made in PHP so it makes for a good example. |
Beta Was this translation helpful? Give feedback.
-
Where should I create a "roadmap" for each update? I want to keep a list of the planned and finished changes for the next update. I know about github projects, but there are changes that are not a separate github issue. Is it okay to do in the discussions section for each version? |
Beta Was this translation helpful? Give feedback.
-
I think we should rename this and remove v0.7 from it, and just keep this discussion for any docker change in the future. |
Beta Was this translation helpful? Give feedback.
-
I may have asked this already, but I forgot and can't find it. Can I delete the |
Beta Was this translation helpful? Give feedback.
-
There is an issue with the install process on Mac, it is not directly related to docker docker, but I thought I mention it here as well: #152. I'll try to find a fix for it. I think we should also replace the Mac uncomment method with an environmental variable if possible. I've been sick and working on a lot of refactoring in the last 2 weeks. I've just started working on features and bug fixes for the next update. I'm planning on working on these:
I do not have any timeline for them. Also I may cut it into multiple updates. @sergiolaverde0 Hope you are doing well! |
Beta Was this translation helpful? Give feedback.
-
Minor change related to docker image. Someone requested fonts for every language, so I'll write a font management system. I'll create a |
Beta Was this translation helpful? Give feedback.
-
Someone tried to update to v0.8 on MacOS without commenting the line, and they got this error on apple silicon processor: I was surprised the git command worked. I've told them they have to uncomment the last line in I had no idea what it is. Someone in an other github project wrote that running it again fixed the issue. I told them to try it. After that linguacafe worked, he had his database deleted. @sergiolaverde0 Any idea what could have happened? The only thing I can think of is that MySQL error. But I do not have any idea what exactly happened. Added an additional note to create a backup to the github release. |
Beta Was this translation helpful? Give feedback.
-
There was a comment thread below my reddit post about the docker process. I'm not sure what to think of it. I know the process is not conventional, but it is a simple step-by-step process to install and update. I think it could be improved if we create the empty folders with the software after the storage directory was mounted. And copy the default files from inside the image to the mounted directory. After that it could be a simple docker-compose.yml file, and users would have to create the two directories, and it would be more similar to how other dockerized software usually works. But I don't think we should do it. It can introduce problems, and I don't think there's anything wrong with the current install/update process itself, it's just different a little to what people are used to. What do you think? |
Beta Was this translation helpful? Give feedback.
-
When I go to the webserver package on github, I see this: Is that third one supposed to be there? |
Beta Was this translation helpful? Give feedback.
-
I was thinking about adding a backup function to the UI, since there are some users who have difficulties with the terminal, and I think even other people would be more inclined to click on a button compared to doing it manually. I found that I can use mysqldump remotely:
And then I think I could create a zip file from the .sql file and the storage folder. I think I could even write an import function for it. This would require mysqldump command to be installed on the php container. I haven't checked yet how large is it. Do you think it is a good solution? |
Beta Was this translation helpful? Give feedback.
-
This is so strange. There is quite a large difference between the php server image, and the python server image download counts. I've heard no complains about anything docker related, so I don't think there's anything wrong. |
Beta Was this translation helpful? Give feedback.
-
I've experimented a little with SQLite, but could not get it working. All the migrations are broken. SQLite uses different collations, which I will have to understand and test. NativePHP seem to be progressing a bit. I won't have time to do it in the next year, but if it will work well, It could be used to package linguacafe as a standalone software by dropping languages that does not have space separated words, and a few features that use the python service. |
Beta Was this translation helpful? Give feedback.
-
It seems like the docker image download count is tripled compared to the usual after v0.12, which seemed to attract less new users and github visitors than usual. Any idea what could have happened? I don't think these are separate users who actually use linguacafe. |
Beta Was this translation helpful? Give feedback.
-
Do you think it would be a good idea to create a beta docker image for people who are proficient with docker enough? I usually manually test features, then I'll start using the new version myself for around a week, before I release it. But since updates will slow down a bit, and with the increased amount of users I want to test things for a longer time, I think it would be useful to have a beta image that would be a new version that I already use myself in my own prod environment. This would also help with an other issue: When I finished a new version, I cannot work on new stuff that will go into the next version, because I do not have a branch for it. Using a beta branch for fixing bugs and problems in the version that is coming out soon, and using dev branch for developing the next version would be really useful. This could also be done without having a beta docker image. |
Beta Was this translation helpful? Give feedback.
-
The latest test image build has failed. Do you have any idea what could have happened? It's just the basic language install/download command. I already had a successful build after the problematic changes were reverted the other day, and the dockerfile have not changed since that. |
Beta Was this translation helpful? Give feedback.
-
Hello @sergiolaverde0, From what I understood from discord discussion with the @simjanos-dev is that the python image currently does not provides arm image is due to japanese spacy model failing to built on the arm machines. The issue is due to package called sudachipy, sudachipy requires Rust and Cargo to present on the arm machines to be installed. There are some extra steps required as This is docker image that works for me, I removed the addition of user because of issues with cargo and path, but I believe it can be added back after some playing around with it. It can install japanese on the arm machines. I am pretty sure that users that are on arm and currently have japanese or other additional languages installed would need to re-install them. However, they could just stay on the linux/amd64 version if it's something they are not comfortable with.
To test only japanese install instead of installing all spacy languages you can run only:
|
Beta Was this translation helpful? Give feedback.
-
Laravel will need 2 additional processes to run for v0.14: one for websockets, and one for job queues. Laravel horizon is supposed to be set up with supervisor, and the websockets can be started with the Is there anything important I should know? Supervisor seems straightforward although I got a permission error. I'll try to make it work next week. However I'm not sure where to start the It's on the features/websockets-vuex branch. And seriously, I really appreciate you debugging the arch linux issue, that was a lot of work. |
Beta Was this translation helpful? Give feedback.
-
Could you please help setting up a cron job for laravel? I tried to do it with supervisor but could not get it working yet. I tried to do it based on this, however I got a permission error for writing into
If it works, it should create a backup every 4 minutes (it runs laravel scheduler every minute) in the storage/backup directory, but obviously I could not test it. I'll try to do it later on the weekend again if you have no time for it. |
Beta Was this translation helpful? Give feedback.
-
Hi! Can I, and should I create a release for beta on github? If yes, should I turn on the pre-release option, and can I set it as the latest release, or will it cause an issue with images? How stable do you think a beta version should be? So far I planned to release it after using it myself for a few days. However nowadays I don't really read at all, and currently this is the only thing holding me back from releasing a beta. Do you think it's okay to just release it after manually testing every change a bit? I haven't worked a lot on linguacafe lately and we didn't communicate much, I hope you are doing well nowadays. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have created this to have a place where to discuss the changes I contribute to, since we have been misusing the issue tracker for that despite many of our exchanges not being proper bug reports.
For the upcoming 0.7 release, my tasks so far are:
Finish the docker versioning changes, which should be fairly simple once I get down to itDone at feat: change the action from build on commit to main to build on release #124.Remove the JavaScript unneeded code from the final imageDone at feat: reduce image size using a multi stage build #105.Remove possible unneeded Python codeNot possible because of external dependencies.Should anything more be proposed for 0.7, it goes here, and if something happens internally without affecting the end users, it goes here too and not in the issues since that would not be a bug but a part of the development process.
Beta Was this translation helpful? Give feedback.
All reactions