gunicorn: don't use shared memory for model.
Docker Build / docker-build (push) Waiting to run

This didn't seem to be necessary, and it made running in Docker more difficult
since you have to use --shm-size=1G to raise the shared memory limit.
This commit is contained in:
evazion
2022-06-30 21:15:45 -05:00
parent 524a2a8c7b
commit 1edfba77c9
+2 -2
View File
@@ -15,8 +15,8 @@ autotagger = Autotagger(model_path)
# This is necessary for Gunicorn to work with multiple workers and preloading enabled.
torch.set_num_threads(1)
autotagger.learn.model.eval()
autotagger.learn.model.share_memory()
#autotagger.learn.model.eval()
#autotagger.learn.model.share_memory()
app = Flask(__name__)
app.config["JSON_SORT_KEYS"] = False