support arm

This commit is contained in:
Adam 2023-02-11 21:09:48 -05:00
parent c3696632dd
commit 0596869223
4 changed files with 5 additions and 6 deletions

View file

@ -1,9 +1,8 @@
# syntax-docker/dockerfile:1 # syntax-docker/dockerfile:1
FROM python:slim FROM python:3.10-slim
WORKDIR /app WORKDIR /app
COPY requirements.txt requirements.txt COPY requirements.txt requirements.txt
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
RUN pip install --no-cache-dir -r requirements.txt RUN python3 -m pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"] CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]

View file

@ -4,6 +4,6 @@ FastAPI and PyTorch
To build yourself you'll need to first train a model with ../train To build yourself you'll need to first train a model with ../train
My image compressed is 2.1GB My image compressed is 1.4GB
Scripts in test to talk to it Scripts in test to talk to it

View file

@ -1,5 +1,5 @@
fastapi fastapi
uvicorn uvicorn
transformers transformers
--extra-index-url https://download.pytorch.org/whl/cpu --extra-index-url https://download.pytorch.org/whl/cpu/torch
torch torch

View file

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
docker run -d -p 6969:8000 chatbots_api docker run -p 6969:8000 chatbots_api