From 05968692235d49d128a9909606d50f5ff9e34065 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Sat, 11 Feb 2023 21:09:48 -0500 Subject: [PATCH] support arm --- api/Dockerfile | 5 ++--- api/readme.md | 2 +- api/requirements.txt | 2 +- api/run | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index e6f1987..b3b24b8 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,9 +1,8 @@ # syntax-docker/dockerfile:1 -FROM python:slim +FROM python:3.10-slim WORKDIR /app COPY requirements.txt requirements.txt ENV PYTHONUNBUFFERED=1 -RUN pip install --no-cache-dir -r requirements.txt - +RUN python3 -m pip install --no-cache-dir -r requirements.txt COPY . . CMD [ "uvicorn", "chatbots:api", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"] diff --git a/api/readme.md b/api/readme.md index 83d9b24..5ae6ffd 100644 --- a/api/readme.md +++ b/api/readme.md @@ -4,6 +4,6 @@ FastAPI and PyTorch 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 diff --git a/api/requirements.txt b/api/requirements.txt index 3349917..b5abfc4 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,5 +1,5 @@ fastapi uvicorn transformers ---extra-index-url https://download.pytorch.org/whl/cpu +--extra-index-url https://download.pytorch.org/whl/cpu/torch torch diff --git a/api/run b/api/run index 9c127c0..1e0e0e7 100755 --- a/api/run +++ b/api/run @@ -1,3 +1,3 @@ #!/bin/bash -docker run -d -p 6969:8000 chatbots_api +docker run -p 6969:8000 chatbots_api