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

Move from asdf to Dev Container #202

Merged
merged 5 commits into from
May 16, 2024
Merged

Move from asdf to Dev Container #202

merged 5 commits into from
May 16, 2024

Conversation

ai
Copy link
Contributor

@ai ai commented May 15, 2024

Right now we use asdf to sync environment. It has a few problems:

  1. asdf has conflict with nvm. The conflict behavior is very strange and user can spend a lot of time finding the source of issue.
  2. Some tool in node_modules may contain malware. It should not have full access to user’s home folder with credentials JSONs and private files. Dev Container isolate project.
  3. Every user will have exactly the same environment.

Risks:

  1. I test it only for Podman. I need Docker user to test it.
  2. We need to test Windows and Mac performance.

@ai ai merged commit f4ec290 into main May 16, 2024
8 checks passed
@ai ai deleted the devcontainer branch May 16, 2024 12:57
@baileys-li
Copy link
Contributor

baileys-li commented May 16, 2024

We need to test Windows and Mac performance.
I have access to both.

@ai, what exactly do I need to test? I've already tried running pnpm test, and I've noticed a perceptible slowdown when using the development container. Although it's still usable, the difference in performance is noticeable.

macOS M1 in dev container:

pnpm test 142.77s user 40.95s system 343% cpu 53.452 total

macOS M1 in asdf

Executed in   24.23 secs    fish           external
   usr time   59.70 secs    0.07 millis   59.70 secs
   sys time    7.97 secs    1.13 millis    7.97 secs

(time output)

@baileys-li
Copy link
Contributor

baileys-li commented May 16, 2024

asdf has conflict with nvm.

AFAIU it's not asdf causing the problems, it's pnpm. pnpm is trying to be an alternative not only for npm, but also for nvm for whatever reason.

And if the console in the current folder shows that Node 22 is being used, pnpm is still using Node 20 under the hood.

At least this is the problem I had with Volta

@ai
Copy link
Contributor Author

ai commented May 16, 2024

@baileys-li sad. On Linux I have no big difference in performance.

Don’t worry, you can still install everything locally and run without VM.

@mike-minchenko
Copy link

For the first time in my life, I decided to try to do something in the open source project, and decided to do everything as Andrei told to do, run through containers. The launch failed))) 😄

Mackbook M1

@ai
Copy link
Contributor Author

ai commented May 17, 2024

@mike-minchenko what error did you have? We may need a little tuning for Docker and Mac.

@mike-minchenko
Copy link

Снимок экрана 2024-05-20 в 12 14 49

This was the first error. After which I added the line to --platform linux/amd64. Everything started, but all the RAM on my laptop was loaded and the computer began to freeze.

@ai
Copy link
Contributor Author

ai commented May 20, 2024

@mike-minchenko what way do you use to run Docker images?

@mike-minchenko
Copy link

Via Devcontainers in VSCode

@ai
Copy link
Contributor Author

ai commented May 20, 2024

@mike-minchenko I mean what tool do you have to run Docker images in the system?

Maybe you use Docker Desktop for Intel?

Can you tried to run other Docker images on your system?

@mike-minchenko
Copy link

I'm using Docker Desktop for Apple Silicon.

I can run other images.

I'm not very familiar with Docker and its settings.
I'll look into it

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.

None yet

3 participants