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

Grafito Docker broken? #27

Open
Ryton opened this issue Oct 4, 2023 · 12 comments
Open

Grafito Docker broken? #27

Ryton opened this issue Oct 4, 2023 · 12 comments
Labels
3rd party bug Something isn't working

Comments

@Ryton
Copy link

Ryton commented Oct 4, 2023

@drkameleon: you wrote: "That being said, you're more than welcome to post all issues you come across, related to... anything."
=>Therefore ;-) :
When i run "docker run -it arturolang/grafito" from windows 11 pro & docker commandline <docker run -it arturolang/grafito>, the container is fetched correctly and built, but when it starts grafito, i get the following response (right after the Grafito-logo):

`

Runtime | dictionary key not found: engine
error | perhaps you meant...
`.
Same happens in WSL2.
image

Possible cause:
Seems to me it is not assigning the engine field in the Versions dict correctly?
i assume the sqlite3 --version returns something faulty within the docker?

and indeed, from within arturo in the docker, i get this response:
$> execute "sqlite3 --version"
=> /bin/sh: sqlite3: not found

Or extended:
$> to :version first split.by:" " execute "sqlite3 --version"

Runtime | cannot convert argument: "/bin/sh:"
error | from :string
| to :dictionary

@Ryton
Copy link
Author

Ryton commented Oct 4, 2023

Yes, that solved it.

RUN apk update && apk upgrade
RUN apk add --no-cache sqlite-dev
RUN apk add sqlite

That gives:
sqlite3 --version
3.41.2 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da
(on a clean Alpine docker image)

(Haven't yet pulled Grafito / Arturo in there too), i assume its easier to add this at your end and push it again to dockerhub?

@drkameleon
Copy link
Contributor

That's awesome! 🚀

The truth is I had left Grafito for a while (until different things had made some progress in Arturo itself) and I got back to it some 3 months ago. It should - mostly - be working, although I admit the margin for improvements is always... ample.

Ah... and why I'm saying all this? Because when "I got back to it", I completely forgot there was a Docker container as well! haha

Since you spotted it, you are absolutely welcome to make a PR yourself if you want, and I will happily merge it (and then update the whole thing @ DockerHub).

If not, I'll do it myself obviously. 😉

@Ryton
Copy link
Author

Ryton commented Oct 5, 2023

i'm not too familiar yet with a Dockerfile integration / Dockerhub uploading, as i mostly just dive in the docker commandline and save the image from there.

But that's not good practice => so this is a good opportunity to get to learn it. => so deal!

The caveat: needs to be quality-checked after!

@drkameleon
Copy link
Contributor

Don't worry about it! I'm not a Docker guru myself either - far from it actually! :)

The main Dockerfile is here: https://github.com/arturo-lang/grafito/blob/main/Dockerfile. I think all you have to do is add the fix there... I think lol. Plus, you'll get the contribution credit you deserve! 😉

Regarding DockerHub, I'll take care of it.

@Ryton
Copy link
Author

Ryton commented Oct 5, 2023

Ok, this part is tackled at least :-) => will make a fork and PR.

$> print Versions
[engine:1.2.3 system:0.2.8 arturo:0.9.82]
$> print Grafito
[Version:0.2.8 Debug?:false verbose?:true caseSensitive?:true Palette:]

But I am(/we are) not out of the woods just yet,
as the rest of (the latest?) grafito script doesn't work (anymore?/either?) in the docker at my end :( .
Will try with an older release of Arturo and/or Grafito.

@drkameleon
Copy link
Contributor

I'll have to test it myself as well and we'll see.

Sure thing is there were issues with the last official release (Arturo's I mean)... which have been fixed in the meantime.

So, the safest bet to see what works and what doesn't would be to use the latest Arturo version (@ master).

As far as I remember, Docker-aside, the two main branches - Arturo and Grafito - should be working together fine right now (at last!). But, let's see, let's see... 😄

@Ryton
Copy link
Author

Ryton commented Oct 5, 2023

We shall! 👍

Impressive work on both, either way. this is just a minor wrinkle that will be smoothed out (soon).
Meanwhile i'll give latest/nightly + Grafito a try later today, good suggestion (though i think i tried that yesterday, and it froze). => but can always try again/dig down.

@Ryton
Copy link
Author

Ryton commented Oct 5, 2023

Could it be as simple as a missing bracket?

If i paste grafito.art in arturo (with trailing spaces), i get a missing ] error.
>> Syntax | missing closing square bracket: ] error | | near: [ | ^

@drkameleon
Copy link
Contributor

drkameleon commented Oct 5, 2023

We shall! 👍

Impressive work on both, either way. this is just a minor wrinkle that will be smoothed out (soon). Meanwhile i'll give latest/nightly + Grafito a try later today, good suggestion (though i think i tried that yesterday, and it froze). => but can always try again/dig down.

😄

Well... I guess the nature of the 2 projects (especially Arturo) is such that the "work in progress" stage is probably meant to remain there forever (and ever... lol).

That being said, I confess I already use Arturo in totally production-level code and so far I've had no real issues. Regarding Grafito, well, that was more like a (very) daring try at using Arturo for something practical - and combining my newly-discovered interest for graphs and graph databases (long story short: I played with Neo4J, loved it, then decided to load it up in a DigitalOcean droplet, realized that thing needed a... super-computer to say the least, and then I followed my normal way of thinking: why not try doing it from scratch myself?! haha)

P.S. You'll make me get back to Grafito seriously (again I mean!). And that's great! (if it weren't for some non-open-source related stuff I'm working on currently, I'd have more time, but what can I do about it...)

@drkameleon
Copy link
Contributor

Could it be as simple as a missing bracket?

If i paste grafito.art in arturo (with trailing spaces), i get a missing ] error. >> Syntax | missing closing square bracket: ] error | | near: [ | ^

Are you using the latest master-branch version of Arturo? (I'm asking so that I know what to test with... 😉 )

@Ryton
Copy link
Author

Ryton commented Oct 5, 2023

yes., using version v/0.9.83 b/889 for testing (own build on WSL2).

got the feeling it there is something weird with the brackets in graph. should the helperfunctions be sub-functions of this block?

@drkameleon
Copy link
Contributor

drkameleon commented Oct 5, 2023

Hmm... 🤔

I've just tried the examples/sample11.art example and it seems to be working. (not with Docker, with the normal build)

A few notes:

  • The Arturo version I'm using is the one straight from the master branch (that is: build 983+, there have been changes recently that may affect Grafito... so...)
  • The same goes for Grafito, the version is the very latest one
  • In order to run it properly, while in the Grafito source folder (and provided that arturo is globally available): arturo examples/sample11.art
  • The above test took place on macOS Ventura (13.6) - Windows has been the source of various issues, mostly UI-related... so, I guess the main engine should work flawlessly, I wouldn't swear about the graphical side of it

This is what I'm looking at right now:

Screenshot 2023-10-05 at 10 54 59

P.S. If you have something concrete you want me to try out, please let me know. For more... Windows-related questions, I think our Discord channel would be a better place for this type of issues, since there are far more knowledgeable people there (and rather active!) that could possibly address them! 😉

@drkameleon drkameleon added bug Something isn't working 3rd party labels Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants