Skip to content

Commit

Permalink
upgrade app for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
lfunderburk committed Jan 29, 2024
1 parent f9da888 commit 70eeb29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion examples/docker/fastapi-ai-helper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM python:3.11

COPY app.py app.py
COPY pipelinehelper.py pipelinehelper.py
COPY .env .env
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt --index-url https://download.pytorch.org/whl/cpu
RUN pip install torch==2.1.1 torchvision==0.16.1 --index-url https://download.pytorch.org/whl/cpu
RUN pip install -r requirements.txt

ENTRYPOINT ["uvicorn", "app:app", "--host=0.0.0.0", "--port=80"]
2 changes: 1 addition & 1 deletion examples/docker/fastapi-ai-helper/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ async def read_root():

if __name__ == "__main__":

uvicorn.run(app, host="0.0.0.0", port=8000)
uvicorn.run(app, host="0.0.0.0", port=80)
4 changes: 1 addition & 3 deletions examples/docker/fastapi-ai-helper/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
haystack-ai==2.0.0b5
haystack-ai
fastapi==0.109.0
torch==2.1.1 # pip install -r requirements.txt --index-url https://download.pytorch.org/whl/cpu
torchvision==0.16.1
transformers
accelerate
bitsandbytes
Expand Down

0 comments on commit 70eeb29

Please sign in to comment.