Skip to content

Commit

Permalink
Merge pull request #434 from JNU-econovation/develop
Browse files Browse the repository at this point in the history
AI분야 release Pull Request
  • Loading branch information
Kyeong6 authored Jul 24, 2024
2 parents ec2e180 + 84d9324 commit db78698
Show file tree
Hide file tree
Showing 38 changed files with 6,590 additions and 1,180 deletions.
2 changes: 0 additions & 2 deletions AI/.gitattributes

This file was deleted.

File renamed without changes.
595 changes: 595 additions & 0 deletions AI/data/diet/preprocessed.csv

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions AI/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.8'

services:
server:
build:
context: ./server
ports:
- "8000:8000"
env_file:
- .env
depends_on:
- food_classification

food_classification:
build:
context: ./food_classification
ports:
- "8080:8080"
env_file:
- .env
1 change: 1 addition & 0 deletions AI/food_classification/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
model/model_param.pt filter=lfs diff=lfs merge=lfs -text
32 changes: 32 additions & 0 deletions AI/food_classification/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# pytorch/torchserve 이미지는 아래 코드를 통해 다운로드 가능
# $ sudo docker pull pytorch/torchserve:latest
FROM pytorch/torchserve:latest

# setting workdir in the container
WORKDIR /detect_model

# change user and change permissions
USER root
RUN chmod 777 -R .

# torchserve 실행에 필요한 파일 복사
COPY ./labels /detect_model/labels
COPY ./model /detect_model/model
COPY ./src /detect_model/src
COPY ./requirements.txt /detect_model/requirements.txt

# apt-get update에서 오류가 발생하여 추가한 코드
# 시간 관련 설정을 변경
RUN echo "Acquire::Check-Valid-Until \"false\";\nAcquire::Check-Date \"false\";" | cat > /etc/apt/apt.conf.d/10no--check-valid-until

RUN apt-get update
RUN apt install zip unzip

# create mar
RUN bash /detect_model/src/create-mar.sh

ENV JWT_SECRET="secretKeydlqslekdsecretKeydlqslekdsecretKeydlqslekdsecretKeydlqslekdsecretKeydlqslekdsecretKeydlqslekdse"

# start the server
CMD ["torchserve", "--start", "--models", "all", "--ts-config", "/detect_model/src/config.properties", "--no-config-snapshots"]
# ENTRYPOINT
Loading

0 comments on commit db78698

Please sign in to comment.