Skip to content

Commit

Permalink
chore: pin poetry to 1.8.5 (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovik authored Jan 9, 2025
1 parent dc85806 commit 96b151c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.11-alpine as builder

RUN apk update && apk upgrade --no-cache libcrypto3 libssl3
RUN apk add --no-cache alpine-sdk linux-headers
RUN pip install poetry
RUN pip install poetry==1.8.5

WORKDIR /app

Expand Down
29 changes: 18 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
PORT ?= 5001
IMAGE_NAME ?= ai-dial-adapter-openai
PLATFORM ?= linux/amd64
VENV ?= .venv
POETRY ?= ${VENV}/bin/poetry
POETRY_VERSION ?= 1.8.5
ARGS=

.PHONY: all install build serve clean lint format test integration_tests docker_build docker_run
.PHONY: all init_env install build serve clean lint format test integration_tests docker_build docker_run

all: build

install:
poetry install
init_env:
python -m venv ${VENV}
${VENV}/bin/pip install poetry==${POETRY_VERSION} --quiet

install: init_env
${POETRY} install

build: install
poetry build
${POETRY} build

serve: install
poetry run uvicorn "aidial_adapter_openai.app:app" --reload --host "0.0.0.0" --port $(PORT) --workers=1 --env-file ./.env
${POETRY} run uvicorn "aidial_adapter_openai.app:app" --reload --host "0.0.0.0" --port $(PORT) --workers=1 --env-file ./.env

clean:
poetry run clean
poetry env remove --all
${POETRY} run clean
${POETRY} env remove --all

lint: install
poetry run nox -s lint
${POETRY} run nox -s lint

format: install
poetry run nox -s format
${POETRY} run nox -s format

test: install
poetry run nox -s test -- $(ARGS)
${POETRY} run nox -s test -- $(ARGS)

integration_test: install
poetry run nox -s integration_test -- $(ARGS)
${POETRY} run nox -s integration_test -- $(ARGS)

docker_serve:
docker build --platform $(PLATFORM) -t $(IMAGE_NAME):dev .
Expand Down

0 comments on commit 96b151c

Please sign in to comment.