Skip to content

Commit 8d7faa0

Browse files
committed
Add docker-compose.yaml
1 parent 1993933 commit 8d7faa0

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![Tensorflow](https://img.shields.io/badge/tensorflow-3.7-yellowgreen)](https://analyticsindiamag.com/tensorflow-2-7-0-released-all-major-updates-features/)
1010

1111

12-
This repo gives an introduction to how to make full working example to serve your model using asynchronous Celery tasks and FastAPI. This post walks through a working example for serving a ML model using Celery and FastAPI. All code can be found in this repository. We won’t specifically discuss the ML model used for this example however it was trained using coco dataset with 90 object class like cat, dog, bird ... more detail here [Coco Dataset](https://cocodataset.org/#home). The model have been train with tensorflow [Tensorflow](https://github.com/tensorflow/models)
12+
This repo gives an introduction to how to make full working example to serve your model using asynchronous Celery tasks and FastAPI. This post walks through a working example for serving a ML model using Celery and FastAPI. All code can be found in this repository. We won’t specifically discuss the ML model used for this example however it was trained using coco dataset with 80 object class like cat, dog, bird ... more detail here [Coco Dataset](https://cocodataset.org/#home). The model have been train with tensorflow [Tensorflow](https://github.com/tensorflow/models)
1313

1414

1515
## Contents
@@ -38,11 +38,11 @@ This repo gives an introduction to how to make full working example to serve you
3838
`git clone https://github.com/apot-group/ml-models-in-production.git`
3939

4040
### 3. Start Server
41-
`cd ml-models-in-production && docker-compose -f docker-compose.dev.yaml up`
41+
`cd ml-models-in-production && docker-compose up`
4242

4343
| Service | URL |
4444
| :-------------------: | :------------------------------: |
45-
| API docs | http://localhost:8081/api/docs |
45+
| API docs | http://localhost/api/docs |
4646
| Demo Web | http://localhost |
4747

4848
go to Demo web ```http://localhost``` and test with your picture.

docker-compose.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@ services:
3333

3434
# API
3535
ml-api:
36-
build:
37-
context: ./ml-api
38-
dockerfile: ./Dockerfile
36+
image: duynguyenngoc/mmip-api:0.0.1
3937
container_name: ml-api
4038
restart: unless-stopped
4139
command: sh -c "uvicorn main:app --host 0.0.0.0 --port 8081 --reload"
4240
volumes:
43-
- ./ml-api/app:/app/
4441
- ./ml-storages:/storages/
4542
- api-logs:/logs/
4643
ports:
@@ -50,23 +47,19 @@ services:
5047

5148
# Celery object detection
5249
ml-celery:
53-
build:
54-
context: ./ml-celery
55-
dockerfile: ./Dockerfile
50+
image: duynguyenngoc/mmip-celery:0.0.1
5651
container_name: ml-celery
5752
restart: unless-stopped
5853
command: sh -c "celery -A tasks worker --loglevel=info --concurrency=1 -E --logfile=/logs/celery.log"
5954
volumes:
60-
- ./ml-celery/app:/app/
6155
- ./ml-storages:/storages/
6256
- celery-logs:/logs/
6357
networks:
6458
- mlnet
6559

60+
# Client demo
6661
ml-client:
67-
build:
68-
context: ./ml-client
69-
dockerfile: ./Dockerfile
62+
image: duynguyenngoc/mmip-client:0.0.1
7063
environment:
7164
DOMAIN: localhost
7265
BE_HOST: ml-api

0 commit comments

Comments
 (0)