chore: deploy configs

This commit is contained in:
2024-07-21 22:51:03 +01:00
parent 49910ece1b
commit f73f98d74a
5 changed files with 63 additions and 2 deletions

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
.DS_Store
*.mp3
__pycache__

18
.github/workflows/fly-deploy.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM python:3.9
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN python --version
RUN pip3 --version
RUN pip3 install torch==2.1.0 -f https://download.pytorch.org/whl/cu111/torch_stable.html && \
pip3 install setuptools wheel && \
pip3 install --no-cache-dir -r /code/requirements.txt -f https://download.pytorch.org/whl/cu111/torch_stable.html
COPY . /code
CMD ["fastapi", "run", "server.py", "--port", "8000"]

22
fly.toml Normal file
View File

@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for infinifi on 2024-07-21T22:09:32+01:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'infinifi'
primary_region = 'lhr'
[build]
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1

View File

@@ -1,5 +1,5 @@
torchtext==0.16.0
torchaudio==2.1.0
audiocraft==1.3.0 audiocraft==1.3.0
fastapi==0.111.1 fastapi==0.111.1
modal==0.63.84 modal==0.63.84
torch==2.1.0
torchaudio==2.1.0