Skip to content

Commit

Permalink
chore: speed up installation in production environment
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed May 31, 2024
1 parent 273139e commit 7206581
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN NODE_ENV=production bun run build
FROM pypy:3.10 AS py
WORKDIR /app
COPY pyproject.toml .
RUN pip install pdm && pdm install --prod && pdm venv activate > activate.sh
RUN pip install uv && uv venv && uv pip install -r pyproject.toml --compile-bytecode

FROM pypy:3.10-slim AS base
WORKDIR /app
Expand All @@ -20,4 +20,4 @@ ENV PORT 9040

EXPOSE $PORT

CMD /bin/bash -c "$(cat activate.sh) && python3 -O -m uvicorn src:app --host 0.0.0.0 --port $PORT"
CMD /bin/bash -c "source .venv/bin/activate && python3 -O -m uvicorn src:app --host 0.0.0.0 --port $PORT"
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[project]
name = "promplate-demo"
version = "1"
authors = [{ name = "Muspi Merol", email = "[email protected]" }]
requires-python = ">=3.10,<3.13"
readme = "README.md"
Expand Down

0 comments on commit 7206581

Please sign in to comment.