Skip to content

Commit

Permalink
fix(docker) fix not being able to read package version
Browse files Browse the repository at this point in the history
We were only installing the dependencies, but not Skynet itself. Do so,
and this way we don't need to copy the files later as they are part of
the venv.
  • Loading branch information
saghul committed Feb 24, 2025
1 parent 399ae65 commit 13c0ad1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ RUN \
apt-dpkg-wrap apt-get install -y build-essential python3.11 python3.11-venv

COPY requirements*.txt /app/
COPY pyproject.toml /app/
COPY skynet /app/skynet

WORKDIR /app

Expand All @@ -27,10 +29,10 @@ RUN \
. .venv/bin/activate && \
if [ "$BUILD_WITH_VLLM" = "1" ]; then \
echo "Building with VLLM"; \
pip install -r requirements-vllm.txt; \
pip install -r requirements-vllm.txt . ; \
else \
echo "Building without VLLM"; \
pip install -r requirements.txt; \
pip install -r requirements.txt . ; \
fi

## Build ffmpeg
Expand Down Expand Up @@ -78,7 +80,6 @@ COPY --from=ffmpeg_builder /usr/local/include /usr/local/include
COPY --from=ffmpeg_builder /usr/local/lib/lib* /usr/local/lib/
COPY --from=ffmpeg_builder /usr/local/lib/pkgconfig /usr/local/lib/pkgconfig
COPY --chown=jitsi:jitsi --from=builder /app/.venv /app/.venv
COPY --chown=jitsi:jitsi /skynet /app/skynet/

RUN \
apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion docker/run-skynet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

cd /app
. .venv/bin/activate
exec python3.11 skynet/main.py
exec python -m skynet.main
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[tool.poetry]
name = "skynet"
version = "0.1.0"
description = ""
authors = ["Jitsi Team <[email protected]>"]
readme = "README.md"

[tool.poetry.requires-plugins]
poetry-plugin-export = ">=1.8"
Expand Down

0 comments on commit 13c0ad1

Please sign in to comment.