-
Notifications
You must be signed in to change notification settings - Fork 35
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
Docker #64
Comments
Hi,
I managed to get it working in my fork, but I must say it was lot harder than anticipated. And clean docker build takes me about 20 minutes. How is your build doing on that front? It seems very excessive to me.
…--- original message ---
On December 10, 2022 at 2:10 AM GMT+1 ***@***.*** wrote:
Hey @TadeasPilar, I saw you were making good progress to run Kiri with Docker.
I was also doing the same some days ago.
Did you make progress on that?
I manage to make something today, and I put my work here https://github.com/leoheck/kiri-docker
It is a different repo since it does not need anything from the main Kiri repo since everything will be inside the Docker.
I invite you to check if it works for you.
I just tested it on my Ubuntu Linux, so for me, it is working already. I want to test on other systems and improve it a bit when I have more time.
Also, it generates .kiri files in place (inside the repo of the project on the host)
To run it, you just need to do
make build # to build the docker image
./kiri PROJECT_PATH
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
--- end of original message ---
|
I don't think it was hard. My image and script also allows you to open GUI's too. The run script works with the already created container. You don't have to rebuild the container everytime to put your files in it. I also shared the existing image on docker hub. This is my first approach tho. It can be improved with time. I don't think it takes 20 minutes to build. But I have to evaluate this closely to have a better idea. You said it is very excessive. Very excessive in which sense? Ah, by the way, thank you for the feedback @TadeasPilar |
My goal with this whole thing is to automatically generate project output files on Jenkins build server. So that with every commit, output files are generated. Right now, I am automatically generating renders, bom, ibom, gerbers, and I also want to add kidiff. This would allow for viewing KiCad files and changes online, without having to download the whole project and set up libraries. For this, GUI's aren't all that useful.
My biggest issue right now, is the need for active server running in the background. I know very little javascript, but I would like to figure out, how to rewrite your code into running correctly without active server.
…--- original message ---
On December 13, 2022 at 1:49 PM GMT+1 ***@***.*** wrote:
I don't think it was hard. My image and script also allows you to open GUI's too. The run script works with the already created container. You don't have to rebuild the container everytime to put your files in it. I also shared the existing image on docker hub.
This is my first approach tho. It can be improved with time.
I don't think it takes 20 minutes to build. But I have to evaluate this again, later.
You said it is very excessive. Very excessive in which sense?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
--- end of original message ---
|
Sure, I totally agree with you. In this case, it looks like it needs 2 different images. Also, there is this case that I am creating initially, that allows me to debug and test things and evaluate this Docker thing, easily. I think I will also provide this second image for the reason you are describing, and doing the same as you, using the kicad_auto image, to make other tools available.
It does not need that.. you can disable the server with the parameter So, if you unpack the files on another computer, you can start the server quickly by running the script that is already inside the folder |
Ah, for reviewing schematics of a project using Kicad 6, kiri needs GUI tools, since it plots schematics using xdotool once there are no tools that can do the same with the command line like plotgitsh does for Kicad 5 |
@TadeasPilar I figured out that my current Dockerfile was very badly optimized and the image was consuming a lot of space. Now it is a bit better. Also, I have removed some unnecessary dependencies like wxpython* that are not really necessary for command line operation. Feel free to check my docker file for the currently required dependencies. i For instance, these lines are not necessary to run kiri, specially of command line only is used.
I still did not try to generate an image using |
The compressed image, if someone wants to donwload, is 1GB now, https://hub.docker.com/r/leoheck/kiri/tags Without compression it takes 3GB |
It is taking 8 minutes to build the image on my machine now. I think I can still trim it a bit more... |
@TadeasPilar I added a new Docker file with kicad_auto tools. This one https://github.com/leoheck/kiri-docker/blob/main/Dockerfile_kicad-auto. Example of usage, using pcbdraw: ./kiri /home/lheck/Documents/assoc-board -i leoheck/kiri:test -d -c "pcbdraw board.kicad_pcb board.svg" |
This looks interesting, maybe the Docker image could be used to support a GitHub Action that could be easily shared? |
Yeah, that would be interesting too. |
I'm also interested in the GitHub action. That would be a great feature! |
Nice, I did not have time yet to check this. But in the past, I was using some existing actions to achieve that. So, I stopped doing that at that time because I could not find an easy way to host kiri's website while browsing an Issue or PR, for instance. Yes, I could send data back to the Issue/PR, and I also created a flag to easily archive the run ( -x|--archive) and an easy way to review the results (https://github.com/leoheck/kiri#archiving-generated-files) without having kiri installed locally, but I really wanted to have a way to use the web service on the fly. Today I may find something. I will check what I can do but help on that can be used too. Thanks you. |
Closing this, please open it again if needed. |
Hey @TadeasPilar, I saw you were making good progress to run Kiri with Docker.
I was also doing the same some days ago.
Did you make progress on that?
I manage to make something today, and I put my work here https://github.com/leoheck/kiri-docker
It is a different repo since it does not need anything from the main Kiri repo since everything will be inside the Docker.
I invite you to check if it works for you.
I just tested it on my Ubuntu Linux, so for me, it is working already. I want to test on other systems and improve it a bit when I have more time.
Also, it generates .kiri files in place (inside the repo of the project on the host)
To run it, you just need to do
make build # to build the docker image ./kiri PROJECT_PATH
The text was updated successfully, but these errors were encountered: