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

Gitpod seems not work #25

Closed
pickoba opened this issue Apr 19, 2022 · 7 comments · Fixed by #26
Closed

Gitpod seems not work #25

pickoba opened this issue Apr 19, 2022 · 7 comments · Fixed by #26

Comments

@pickoba
Copy link

pickoba commented Apr 19, 2022

First of all, thanks for the great libraries! I have recently been having fun creating slides using SLyDIFi 😄

What I've encountered
When I opened this repo in Gitpod using the link on README, I got the following error in the integrated terminal:

 HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
export PATH=/home/gitpod/.opam/4.10.0/bin:$PATH;./entrypoint.sh
} && {
satysfi demo/demo.saty; open demo/demo.saty demo/demo.pdf
}
od/cmd-0 history -r; {9j2bk08qpv5:/workspace/slydifi$  HISTFILE=/workspace/.gitpo
> export PATH=/home/gitpod/.opam/4.10.0/bin:$PATH;./entrypoint.sh
> } && {
> satysfi demo/demo.saty; open demo/demo.saty demo/demo.pdf
> }
[ERROR] Opam has not been initialised, please run `opam init'
[ERROR] Opam has not been initialised, please run `opam init'
[ERROR] Opam has not been initialised, please run `opam init'
./entrypoint.sh: 9: satyrographos: not found
gitpod@monaqa-slydifi-9j2bk08qpv5:/workspace/slydifi$ 

It seems that opam is not initialized correctly. I have also tried Gitpod with other libraries such as easytable, and got the same error.

It is probably because the user who invoked opam init (root) and the user on Gitpod (gitpod) are different.

@monaqa
Copy link
Owner

monaqa commented Apr 19, 2022

Thanks for the report.
I don't usually use gitpod or docker-satysfi, so I have no idea how to solve this problem. Do you have any good ideas?

@pickoba
Copy link
Author

pickoba commented Apr 19, 2022

To be honest, I also have no idea because I don't usually use gitpod too...

But it seems to me that it need to be done it manually, including the installation of SATySFi, as a normal user. I have tried the following configuration in my private repo and it works fine.

# .gitpod.Dockerfile
FROM gitpod/workspace-base

RUN sudo install-packages opam

USER gitpod

RUN echo '. /home/gitpod/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true' >> /home/gitpod/.bashrc
RUN opam init --disable-sandboxing

RUN eval $(opam env) && opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git
RUN eval $(opam env) && opam repository add satyrographos https://github.com/na4zagin3/satyrographos-repo.git
RUN eval $(opam env) && opam update

RUN eval $(opam env) && opam install --yes satysfi satysfi-dist satyrographos
RUN eval $(opam env) && satyrographos install

But this of course takes a lot of time to build the image.

@monaqa
Copy link
Owner

monaqa commented Apr 19, 2022

Thank you!

Hmm, if the Dockerfile is going to be somewhat complicated or manual one, it might be better to create a separate repository for a quick trial of SATySFi.
This is the SLyDIFi repository, and the Gitpod demo environment is just an adjunct, so I would like to avoid seriously maintaining Dockerfile here.

@pickoba
Copy link
Author

pickoba commented Apr 23, 2022

May I create a docker image for Gitpod + SATySFi which can be used here?

I'm currently planning to release SATySFi Workshop to Open VSX (Marketplace for Gitpod, etc.), so I think I would be the right person to manage it 👍

@monaqa
Copy link
Owner

monaqa commented Apr 23, 2022

I too have been thinking how great it would be if the SATySFi workshop was available online. I would be extremely grateful if you could do that for me!

@pickoba
Copy link
Author

pickoba commented Apr 27, 2022

I’ve just created a docker image (pickoba/gitpod-satysfi) and a template which use it! You can now use SATySFi, Satyrographos, and satysfi-language-server on Gitpod!

@monaqa
Copy link
Owner

monaqa commented Apr 27, 2022

Excellent!!
I have confirmed that your Gitpod template does indeed work in this repository.

Thank you again!

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 a pull request may close this issue.

2 participants