support arm
This commit is contained in:
parent
c3696632dd
commit
0596869223
4 changed files with 5 additions and 6 deletions
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
2
api/run
2
api/run
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker run -d -p 6969:8000 chatbots_api
|
||||
docker run -p 6969:8000 chatbots_api
|
||||
|
|
Loading…
Add table
Reference in a new issue