diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh deleted file mode 100644 index c4e3347..0000000 --- a/backend/entrypoint.sh +++ /dev/null @@ -1,2 +0,0 @@ -# On NODE: -# celery -A amuman worker --loglevel=info \ No newline at end of file diff --git a/backend/justfile b/backend/justfile deleted file mode 100644 index 65a5546..0000000 --- a/backend/justfile +++ /dev/null @@ -1,23 +0,0 @@ -network: - sudo docker network create amuman - -build: - sudo docker build . -t amuman - -build_db: - sudo docker run --rm -it -v .:/app amuman poetry run python manage.py makemigrations --settings=amuman.settings_manager - sudo docker run --rm -it -v .:/app amuman poetry run python manage.py makemigrations --settings=amuman.settings_node - sudo docker run --rm -it -v .:/app amuman poetry run python manage.py makemigrations --settings=amuman.settings_client - sudo docker run --rm -it -v .:/app amuman poetry run python manage.py migrate --settings=amuman.settings_manager - sudo docker run --rm -it -v .:/app amuman poetry run python manage.py migrate --settings=amuman.settings_node - sudo docker run --rm -it -v .:/app amuman poetry run python manage.py migrate --settings=amuman.settings_client - -manager: - sudo docker rm -f manager - sudo docker run --network amuman --rm -it -v .:/app --name manager -p 8000:8000 amuman - -node: - sudo docker rm -f node - sudo docker run --network amuman --gpus all --rm -it -v .:/app --name node amuman poetry run python manage.py runserver --settings=amuman.settings_node -it: - sudo docker run --network amuman --gpus all --rm -it -v .:/app amuman bash diff --git a/dockerfile b/dockerfile index e285a29..21fb8df 100644 --- a/dockerfile +++ b/dockerfile @@ -32,4 +32,4 @@ ADD pyproject.toml poetry.lock /app/ RUN poetry install --no-root COPY . /app -CMD poetry run python manage.py runserver 0.0.0.0:8000 --settings=amuman.settings_manager +CMD poetry run python backend/manage.py runserver 0.0.0.0:8000 --settings=amuman.settings_manager diff --git a/backend/flake.lock b/flake.lock similarity index 100% rename from backend/flake.lock rename to flake.lock diff --git a/backend/flake.nix b/flake.nix similarity index 100% rename from backend/flake.nix rename to flake.nix diff --git a/justfile b/justfile new file mode 100644 index 0000000..f6692c9 --- /dev/null +++ b/justfile @@ -0,0 +1,23 @@ +network: + sudo docker network create amuman + +build: + sudo docker build . -t amuman + +build_db: + sudo docker run --rm -it -v .:/app amuman poetry run python backend/manage.py makemigrations --settings=amuman.settings_manager + sudo docker run --rm -it -v .:/app amuman poetry run python backend/manage.py makemigrations --settings=amuman.settings_node + sudo docker run --rm -it -v .:/app amuman poetry run python backend/manage.py makemigrations --settings=amuman.settings_client + sudo docker run --rm -it -v .:/app amuman poetry run python backend/manage.py migrate --settings=amuman.settings_manager + sudo docker run --rm -it -v .:/app amuman poetry run python backend/manage.py migrate --settings=amuman.settings_node + sudo docker run --rm -it -v .:/app amuman poetry run python backend/manage.py migrate --settings=amuman.settings_client + +manager: + sudo docker rm -f manager + sudo docker run --network amuman --rm -it -v .:/app --name manager -p 8000:8000 amuman + +node: + sudo docker rm -f node + sudo docker run --network amuman --gpus all --rm -it -v .:/app --name node amuman poetry run python backend/manage.py runserver --settings=amuman.settings_node +it: + sudo docker run --network amuman --gpus all --rm -it -v .:/app amuman bash diff --git a/backend/poetry.lock b/poetry.lock similarity index 95% rename from backend/poetry.lock rename to poetry.lock index 0c4e99b..6e0a62a 100644 --- a/backend/poetry.lock +++ b/poetry.lock @@ -14,6 +14,28 @@ files = [ [package.dependencies] vine = ">=5.0.0,<6.0.0" +[[package]] +name = "anyio" +version = "4.2.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +optional = false +python-versions = ">=3.8" +files = [ + {file = "anyio-4.2.0-py3-none-any.whl", hash = "sha256:745843b39e829e108e518c489b31dc757de7d2131d53fac32bd8df268227bfee"}, + {file = "anyio-4.2.0.tar.gz", hash = "sha256:e1875bb4b4e2de1669f4bc7869b6d3f54231cdced71605e6e64c9be77e3be50f"}, +] + +[package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +idna = ">=2.8" +sniffio = ">=1.1" +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} + +[package.extras] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] + [[package]] name = "asgiref" version = "3.7.2" @@ -643,6 +665,76 @@ files = [ django = ">=3.0" pytz = "*" +[[package]] +name = "exceptiongroup" +version = "1.2.0" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "h11" +version = "0.14.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.7" +files = [ + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, +] + +[[package]] +name = "httpcore" +version = "1.0.2" +description = "A minimal low-level HTTP client." +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpcore-1.0.2-py3-none-any.whl", hash = "sha256:096cc05bca73b8e459a1fc3dcf585148f63e534eae4339559c9b8a8d6399acc7"}, + {file = "httpcore-1.0.2.tar.gz", hash = "sha256:9fc092e4799b26174648e54b74ed5f683132a464e95643b226e00c2ed2fa6535"}, +] + +[package.dependencies] +certifi = "*" +h11 = ">=0.13,<0.15" + +[package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<0.23.0)"] + +[[package]] +name = "httpx" +version = "0.26.0" +description = "The next generation HTTP client." +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpx-0.26.0-py3-none-any.whl", hash = "sha256:8915f5a3627c4d47b73e8202457cb28f1266982d1159bd5779d86a80c0eab1cd"}, + {file = "httpx-0.26.0.tar.gz", hash = "sha256:451b55c30d5185ea6b23c2c793abf9bb237d2a7dfb901ced6ff69ad37ec1dfaf"}, +] + +[package.dependencies] +anyio = "*" +certifi = "*" +httpcore = "==1.*" +idna = "*" +sniffio = "*" + +[package.extras] +brotli = ["brotli", "brotlicffi"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] + [[package]] name = "hyperlink" version = "21.0.0" @@ -904,6 +996,17 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "sniffio" +version = "1.3.0" +description = "Sniff out which async library your code is running under" +optional = false +python-versions = ">=3.7" +files = [ + {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, + {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, +] + [[package]] name = "soupsieve" version = "2.5" @@ -1238,4 +1341,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "1719146623b1a3c1209fb04508d7bd90ff2cd15e17e569fc70c923355145c95f" +content-hash = "7cbf3e9e30141b39c5535d1424c537a6ee542460f707e45f08d42d2343f7b696" diff --git a/backend/pyproject.toml b/pyproject.toml similarity index 97% rename from backend/pyproject.toml rename to pyproject.toml index 84726e8..a979cec 100644 --- a/backend/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ notification = "0.2.1" daphne = "4.0.0" python-dotenv = "1.0.1" requests = "^2.31.0" +httpx = "^0.26.0" [build-system] diff --git a/backend/requirements.txt b/requirements.txt similarity index 100% rename from backend/requirements.txt rename to requirements.txt