GithubHelp home page GithubHelp logo

Comments (4)

winstxnhdw avatar winstxnhdw commented on August 26, 2024 1

Oops, so sorry for this. My local container cached an older version of the image which didn't catch this issue. I have fixed it now. Make sure you delete the existing image so you can pull the new one.

from nllb-api.

winstxnhdw avatar winstxnhdw commented on August 26, 2024

Doing that would increase the build times of my CI tremendously. You can cache the model with a persistent volume instead.

docker run --rm -e SERVER_PORT=5000 -e APP_PORT=7860 -p 7860:7860 -v ./cache:/home/user/.cache nllb-api

EDIT:

I never knew that anyone would want to self-host this project. I've added a section on self-hosting in the README. It will explain how you can optimise the API for your use case(s).

from nllb-api.

niksedk avatar niksedk commented on August 26, 2024

Thanks for the info about caching :)

I cannot run the docker image any more:

docker run --rm -e SERVER_PORT=5000 -e APP_PORT=7860 -p 7860:7860 ghcr.io/winstxnhdw/nllb-api:main

2023-09-30 09:34:21,552 INFO supervisord started with pid 1
2023-09-30 09:34:22,555 INFO spawned: 'server' with pid 7
2023-09-30 09:34:22,557 INFO spawned: 'caddy' with pid 8
{"level":"info","ts":1696066462.5948884,"msg":"using provided configuration","config_file":"Caddyfile","config_adapter":"caddyfile"}
{"level":"info","ts":1696066462.5971742,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1696066462.597516,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000662e80"}
{"level":"info","ts":1696066462.5975373,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1696066462.597588,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/home/user/.local/share/caddy"}
{"level":"info","ts":1696066462.5976112,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1696066462.5978942,"msg":"autosaved config (load with --resume flag)","file":"/home/user/.config/caddy/autosave.json"}
{"level":"info","ts":1696066462.5979033,"msg":"serving initial configuration"}
Traceback (most recent call last):
  File "/home/user/app/main.py", line 15, in <module>
    main()
  File "/home/user/app/main.py", line 12, in main
    run(Config())
        ^^^^^^^^
  File "/home/user/app/server/config/__init__.py", line 17, in __init__
    if (port := get_config('SERVER_PORT', int, InvalidPortError, default_port)) == default_port:
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/app/server/config/get_config.py", line 30, in get_config
    raise exception
server.config.exceptions.invalid_port.InvalidPortError
2023-09-30 09:34:23,348 WARN exited: server (exit status 1; not expected)
2023-09-30 09:34:24,352 INFO spawned: 'server' with pid 21
Traceback (most recent call last):
  File "/home/user/app/main.py", line 15, in <module>
    main()
  File "/home/user/app/main.py", line 12, in main
    run(Config())
        ^^^^^^^^
  File "/home/user/app/server/config/__init__.py", line 17, in __init__
    if (port := get_config('SERVER_PORT', int, InvalidPortError, default_port)) == default_port:
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/app/server/config/get_config.py", line 30, in get_config
    raise exception
server.config.exceptions.invalid_port.InvalidPortError
2023-09-30 09:34:25,140 WARN exited: server (exit status 1; not expected)
2023-09-30 09:34:27,145 INFO spawned: 'server' with pid 22
Traceback (most recent call last):
  File "/home/user/app/main.py", line 15, in <module>
    main()
  File "/home/user/app/main.py", line 12, in main
    run(Config())
        ^^^^^^^^
  File "/home/user/app/server/config/__init__.py", line 17, in __init__
    if (port := get_config('SERVER_PORT', int, InvalidPortError, default_port)) == default_port:
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/app/server/config/get_config.py", line 30, in get_config
    raise exception
server.config.exceptions.invalid_port.InvalidPortError
2023-09-30 09:34:27,973 WARN exited: server (exit status 1; not expected)
2023-09-30 09:34:30,979 INFO spawned: 'server' with pid 23
Traceback (most recent call last):
  File "/home/user/app/main.py", line 15, in <module>
    main()
  File "/home/user/app/main.py", line 12, in main
    run(Config())
        ^^^^^^^^
  File "/home/user/app/server/config/__init__.py", line 17, in __init__
    if (port := get_config('SERVER_PORT', int, InvalidPortError, default_port)) == default_port:
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/app/server/config/get_config.py", line 30, in get_config
    raise exception
server.config.exceptions.invalid_port.InvalidPortError
2023-09-30 09:34:31,797 WARN exited: server (exit status 1; not expected)

from nllb-api.

niksedk avatar niksedk commented on August 26, 2024

Thanks!
It's working fine now with cashed model :)

from nllb-api.

Related Issues (17)

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.