Skip to content
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

chore: remove docker form nix-shell #188

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Conversation

vdovhanych
Copy link
Member

As there is no need for docker to be present in nix-shell, I would remove it and save us some space in the docker image.

closes #175

@vdovhanych vdovhanych self-assigned this Jul 16, 2022
@grdddj
Copy link
Contributor

grdddj commented Jul 16, 2022

I am not sure this is possible, as then users would need to have docker-compose natively on their machines - currently, they do not have to, they just enter the nix-shell.

We can theoretically assume they have docker already, and so delete only that from shell.nix, leaving docker-compose there

@grdddj
Copy link
Contributor

grdddj commented Jul 16, 2022

Side-note - it seems like the tests are failing in download.sh script because we cannot download the R emulator from Gitlab URL - and that would probably cause issues when building the image as well.

I created an issue for that - #189, will create a PR for that soon

@vdovhanych
Copy link
Member Author

That's something I thought. It should be looked on as a dependency of the system and not use nix-shell for that as we run it inside our docker container, docker in there is pointless for us, and it just takes up space. Yep, the test failed due to the inability to download the emulator.

@grdddj
Copy link
Contributor

grdddj commented Jul 18, 2022

That's something I thought. It should be looked on as a dependency of the system and not use nix-shell for that as we run it inside our docker container, docker in there is pointless for us, and it just takes up space

I am not against it, as long as the users will be fine :)

@vdovhanych
Copy link
Member Author

vdovhanych commented Jul 18, 2022

removing the docker and docker-compose from nix-shell we save about 400MB on our image.

Screenshot 2022-07-18 at 15 15 18

@grdddj
Copy link
Contributor

grdddj commented Jul 18, 2022

removing the docker and docker-compose from nix-shell we save about 400MB on our image.

That is very nice!

What is strange is that the MAC-images seem to be much smaller than the Linux ones. The latest in your case has 2.83GB, my latest is 3.82GB

ghcr.io/trezor/trezor-user-env    latest    f9da0f40194e   5 days ago   3.82GB

@vdovhanych
Copy link
Member Author

That's mainly because we have fewer firmwares to download for the arm version as the old ones do not work there. We should also consider doing this - #144

@vdovhanych vdovhanych requested a review from tsusanka July 19, 2022 08:59
@grdddj
Copy link
Contributor

grdddj commented Jul 19, 2022

That's mainly because we have fewer firmwares to download for the arm version as the old ones do not work there.

Good point. I see that my src/binaries/firmware has around 500 MB, so the other half a GB must come from somewhere else.

We should also consider doing this - #144

If we know exactly which versions are no longer used, let's delete them. Hard to say whether to delete them on trezor.io, or locally in download.sh after saving them.

Copy link
Contributor

@tsusanka tsusanka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this 👍.

@vdovhanych
Copy link
Member Author

Ok, merging this, docs are OK as it's stated there you need docker for this to work. We can do the firmware deletion later.

@vdovhanych vdovhanych merged commit 59d89a3 into master Jul 19, 2022
@vdovhanych vdovhanych deleted the vd/remove-packages branch July 19, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

speeding up nix-shell native trezor-user-env server
3 participants