Comments (4)
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.
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.
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.
Thanks!
It's working fine now with cashed model :)
from nllb-api.
Related Issues (17)
- Library libcublas.so.12 is not found HOT 3
- Rate limits HOT 2
- I get an error on docker desktop HOT 39
- start container offline HOT 4
- I'm having a problem using CUDA HOT 3
- how to use facebook/nllb-200-distilled-1.3B model HOT 2
- change model HOT 14
- The readme.md may be a bit confusing HOT 2
- Language Detection HOT 5
- Some issues with the self-hosting option HOT 6
- Translation truncated below 1024 tokens HOT 11
- nllb-api support GPU HOT 13
- Maximum content length is limited HOT 1
- I can translate from English to Japanese, but I can't translate from Japanese to English. HOT 5
- Some text is missed HOT 3
- None of PyTorch, TensorFlow >= 2.0, or Flax have been found. on WSL2 HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nllb-api.