Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inference-server dockerfile so it can run locally #2971

Merged

Conversation

toiletpapercode
Copy link
Contributor

@andreaskoepf: #2956 Added an env PROMETHEUS_MULTIPROC_DIR which causes the container to fail to run locally due to the directory not existing.

Creating the directory after settingUSER ${APP_USER} resolves this

@andreaskoepf
Copy link
Collaborator

hm. this is treating a symptom ... but why does it happen in the first place? E.g. there must be a problem with the main script then:

unset PROMETHEUS_MULTIPROC_DIR
uvicorn main:app --host 0.0.0.0 --port "$PORT"
else
if [ -d "${PROMETHEUS_MULTIPROC_DIR}" ]; then rm -rf "${PROMETHEUS_MULTIPROC_DIR}"; fi
mkdir -p "${PROMETHEUS_MULTIPROC_DIR}"
where I added deletion of the directory or unsetting of the env var?

@andreaskoepf
Copy link
Collaborator

@toiletpapercode could you please share the error message that you get?

@olliestanley olliestanley merged commit d1171a0 into LAION-AI:main Apr 30, 2023
@toiletpapercode
Copy link
Contributor Author

@andreaskoepf That server_main.sh is only executed in the FROM base-env as prod block. And that doesn't happen when running locally via docker compose. OnFROM base-env as dev it executes the uvicorn directly.

The error message was a simple directory not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inference-server failed when docker compose up
3 participants