added flyio deployment example

This commit is contained in:
Jon Taylor
2024-07-01 16:46:38 +01:00
parent 8dff460307
commit 0399c84dfa
8 changed files with 370 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
FROM python:3.11-bullseye
# Open port 7860 for http service
ENV FAST_API_PORT=7860
EXPOSE 7860
# Install Python dependencies
COPY *.py .
COPY ./requirements.txt requirements.txt
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt
# Install models
RUN python3 install_deps.py
# Start the FastAPI server
CMD python3 bot_runner.py --port ${FAST_API_PORT}