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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user