lose weight
This commit is contained in:
parent
a8825132be
commit
1c7e659cba
4 changed files with 22 additions and 2 deletions
13
api/.dockerignore
Normal file
13
api/.dockerignore
Normal file
|
@ -0,0 +1,13 @@
|
|||
bin
|
||||
build
|
||||
Dockerfile-alpine
|
||||
lib
|
||||
__pycache__
|
||||
*/__pycache__
|
||||
*/*/__pycache__
|
||||
*/*/*/__pycache__
|
||||
pyvenv.cfg
|
||||
readme.md
|
||||
run
|
||||
test
|
||||
chatbots_api.tar.gz
|
|
@ -1,7 +1,10 @@
|
|||
# syntax-docker/dockerfile:1
|
||||
FROM pytorch/pytorch
|
||||
FROM alpine
|
||||
WORKDIR /app
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN apk add --no-cache --virtual build-deps py3-pip rust cargo g++ openssl-dev python3-dev
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN apk del build-deps
|
||||
RUN rm -rf /var/cache/apk/*
|
||||
COPY . .
|
||||
CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker build -t chatbots_api .
|
||||
docker buildx build --platform=linux/amd64 --tag chatbots_api --load .
|
||||
docker save chatbots_api | pigz > chatbots_api.tar.gz
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
fastapi
|
||||
uvicorn
|
||||
transformers
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
torch
|
||||
|
|
Loading…
Add table
Reference in a new issue