GithubHelp home page GithubHelp logo

Comments (15)

varbhat avatar varbhat commented on June 14, 2024 2

@nlevee ,

Once upon a time, we used to provide statically linked binaries for all three platforms (see https://github.com/varbhat/exatorrent/blob/15d4e8c73d5572dedd2c504ff33d2008d1caf5ba/.github/workflows/build.yml ). But, unfortunately i couldn't maintain the toolchain i used to build exatorrent for all three platforms, and that's why i only kept docker builds.

Can you please look into it if you have time? Only linux (amd64, arm64) is desirable right now. if you have time, you can also add build definitions for linux i386, arm32. use alpine image for building as musl makes static linking a breeze.

Thank you very much. I have also invited you as collaborator.

CC: @mckaygerhard

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024 1
  1. Ok, I change to alpine and add ca-certificates.
  2. No I don't try to update go.mod, the latest version of anacrolix/torrent drop compatibility with go 1.20. I have to update all deps. I'll try in another PR If it's ok for you and to keep this PR clean

@mckaygerhard I fix the image startup if you don't load a volume and do not change "-dir" param

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024 1

@nlevee you should still solve this issue

bvy example you requested specific permissions not only cited by me.. also cited here: awesome-selfhosted/awesome-selfhosted-data#143 (review)

@nlevee @aicynide there is only one issue left . the user alisaing is not the xpected case.. this fail in my system: cos in fact that useer 1000 doe snot exits in my docker image
image
main...nlevee:exatorrent:feat/optimize-dockerfile#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R34

This one was partly fixed in my previous PR. You can check if you want 😉

I'll make another PR to permit mounting volume

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024 1

@aicynide

github.com/anacrolix/go-libutp
/github/home/go/pkg/mod/github.com/anacrolix/[email protected]/callbacks.go:16:10: cannot define new methods on non-local type *C.utp_callback_arguments
/github/home/go/pkg/mod/github.com/anacrolix/[email protected]/callbacks.go:24:10: cannot define new methods on non-local type *C.utp_callback_arguments
/github/home/go/pkg/mod/github.com/anacrolix/[email protected]/callbacks.go:28:10: cannot define new methods on non-local type *C.utp_callback_arguments
/github/home/go/pkg/mod/github.com/anacrolix/[email protected]/callbacks.go:32:10: cannot define new methods on non-local type *C.utp_callback_arguments
/github/home/go/pkg/mod/github.com/anacrolix/[email protected]/callbacks.go:36:10: cannot define new methods on non-local type *C.utp_callback_arguments
/github/home/go/pkg/mod/github.com/anacrolix/[email protected]/utp.go:29:12: cannot define new methods on non-local type *C.utp_context
/github/home/go/pkg/mod/github.com/anacrolix/[email protected]/utp.go:40:12: cannot define new methods on non-local type *C.utp_context
make: *** [Makefile:21: app] Error 1
Error: Process completed with exit code 2.

You can know build locally with:

make web && make app

Or with docker:

make docker

from exatorrent.

varbhat avatar varbhat commented on June 14, 2024

Yes. This is the reason and major obstacle for this project. I will take a look into it

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024

Hi,
I made a PR to optimize docker image size that seem to fix this issue:

docker build -t "exatorrent" .
[+] Building 77.4s (25/25) FINISHED                                                                             docker:default
 => [internal] load build definition from Dockerfile                                                                      0.0s
 => => transferring dockerfile: 1.05kB                                                                                    0.0s
 => [internal] load .dockerignore                                                                                         0.0s
 => => transferring context: 119B                                                                                         0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                0.8s
 => [auth] docker/dockerfile:pull token for registry-1.docker.io                                                          0.0s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf3  0.0s
 => [internal] load metadata for docker.io/library/node:18                                                                0.6s
 => [internal] load metadata for docker.io/library/golang:1.20-alpine                                                     0.7s
 => [auth] library/node:pull token for registry-1.docker.io                                                               0.0s
 => [auth] library/golang:pull token for registry-1.docker.io                                                             0.0s
 => [build-node 1/5] FROM docker.io/library/node:18@sha256:7ce8b205d15e30fd395e5fa4000bcdf595fcff3f434fe75822e54e82a5f5c  0.0s
 => [build-go 1/7] FROM docker.io/library/golang:1.20-alpine@sha256:cd83dbc874245451226392246bc3f08fbae9138e9fa387dab8e9  0.0s
 => [internal] load build context                                                                                         0.0s
 => => transferring context: 56.59kB                                                                                      0.0s
 => CACHED [build-node 2/5] WORKDIR /exa                                                                                  0.0s
 => [build-node 3/5] ADD internal/web /exa/internal/web                                                                   0.1s
 => CACHED [build-go 2/7] WORKDIR /exa                                                                                    0.0s
 => CACHED [build-go 3/7] COPY go.mod go.sum ./                                                                           0.0s
 => CACHED [build-go 4/7] RUN go mod download                                                                             0.0s
 => [build-go 5/7] COPY . ./                                                                                              0.1s
 => [build-node 4/5] ADD Makefile /exa/                                                                                   0.1s
 => [build-node 5/5] RUN make web                                                                                         5.7s
 => [build-go 6/7] COPY --from=build-node /exa/internal/web/build /exa/internal/web/build                                 0.1s
 => [build-go 7/7] RUN apk add --no-cache make gcc g++ &&     make app                                                   69.4s 
 => [stage-2 1/2] COPY --from=build-go --chown=1000:1000 /exa/build/exatorrent /exatorrent                                0.1s 
 => [stage-2 2/2] WORKDIR /exa                                                                                            0.0s 
 => exporting to image                                                                                                    0.1s 
 => => exporting layers                                                                                                   0.1s 
 => => writing image sha256:8cda5252d4d46920420c59f63d2572535a70e0d68d2f16bc02a099905028af88                              0.0s 
 => => naming to docker.io/library/exatorrent                                                                             0.0s

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024

Hi @aicynide,

If you want I made a fork here : https://github.com/nlevee/exatorrent compilation work as expected

from exatorrent.

mckaygerhard avatar mckaygerhard commented on June 14, 2024

@nlevee @aicynide there is only one issue left . the user alisaing is not the xpected case.. this fail in my system: cos in fact that useer 1000 doe snot exits in my docker image

image

main...nlevee:exatorrent:feat/optimize-dockerfile#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R34

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024

Yes, I can fix it, but I'll hope this PR to pass before.

@varbhat can you merge ? Else I can continue on my fork.

from exatorrent.

varbhat avatar varbhat commented on June 14, 2024

@nlevee,

I am glad that you are working on improving exatorrent.

But, two things.

  1. Use alpine as final image instead of scratch image. You get TLS certs managed in alpine image. In scratch, you need to copy TLS certs to the image which is not very good way compared to directly basing upon alpine images. Maybe we can look into using linuxcontainers.io images too but we can do this later.

  2. Have you tried updating the deps in go.mod and compiling then? I am facing issues compiling after updating deps in go.mod probably from anacrolix/torrent packages and deps (esp. sqlite). See it if possible

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024

I fixed compilation on golang 1.21 with all libraries updated, you can check the PR #404

from exatorrent.

varbhat avatar varbhat commented on June 14, 2024

@nlevee ,

Thank you very much. Can you make da81de4 as seperate PR?

from exatorrent.

mckaygerhard avatar mckaygerhard commented on June 14, 2024

@nlevee .. i talked with @varbhat so you can work in this now, and @varbhat he made a PR in #404

from exatorrent.

mckaygerhard avatar mckaygerhard commented on June 14, 2024

@nlevee you should still solve this issue

bvy example you requested specific permissions not only cited by me.. also cited here: awesome-selfhosted/awesome-selfhosted-data#143 (review)

@nlevee @aicynide there is only one issue left . the user alisaing is not the xpected case.. this fail in my system: cos in fact that useer 1000 doe snot exits in my docker image

image

main...nlevee:exatorrent:feat/optimize-dockerfile#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R34

from exatorrent.

nlevee avatar nlevee commented on June 14, 2024

@nlevee ,

Once upon a time, we used to provide statically linked binaries for all three platforms (see https://github.com/varbhat/exatorrent/blob/15d4e8c73d5572dedd2c504ff33d2008d1caf5ba/.github/workflows/build.yml ). But, unfortunately i couldn't maintain the toolchain i used to build exatorrent for all three platforms, and that's why i only kept docker builds.

Can you please look into it if you have time? Only linux (amd64, arm64) is desirable right now. if you have time, you can also add build definitions for linux i386, arm32. use alpine image for building as musl makes static linking a breeze.

Thank you very much. I have also invited you as collaborator.

CC: @mckaygerhard

I'll take this one too yes.

Btw there's already an issue on this #377

from exatorrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.