Skip to content

Commit

Permalink
fix ports, host
Browse files Browse the repository at this point in the history
  • Loading branch information
azuur committed Feb 6, 2024
1 parent 8458e2a commit 5722a57
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
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

0 comments on commit 5722a57

Please sign in to comment.