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 ports, host #19

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ RUN apt-get update && apt-get install -y curl
COPY --from=build /dist/*.whl /package/.
RUN pip install *.whl

EXPOSE 80
EXPOSE 8000

USER python
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
fastapi:
image: ml_pipelines:latest
ports:
- "8000:8000"
command: ["/bin/bash", "-c", "python -m ml_pipelines serve_local"]
env_file:
- .env
volumes:
- /path/to/data:/package/data
2 changes: 1 addition & 1 deletion ml_pipelines/deployment/aws/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def main(
load_data=False,
)

uvicorn_kwargs: dict = {"port": 80}
uvicorn_kwargs: dict = {"host": "0.0.0.0", "reload": False, "debug": False}
run_serve( # noqa: PLR0913
train_version=train_version,
get_train_artifacts_func=get_train_artifacts_func,
Expand Down
2 changes: 1 addition & 1 deletion ml_pipelines/deployment/local/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def main(
load_data=False,
)

uvicorn_kwargs: dict = {}
uvicorn_kwargs: dict = {"host": "0.0.0.0", "reload": False, "debug": False}
run_serve( # noqa: PLR0913
train_version=train_version,
get_train_artifacts_func=get_train_artifacts_func,
Expand Down
Loading