Skip to content

Commit

Permalink
chore(no_model): fix missing arm64 dependencies on runtime
Browse files Browse the repository at this point in the history
- Missing dependencies were added for arm64 architecture

Signed-off-by: 陳鈞 <[email protected]>
  • Loading branch information
jim60105 committed Nov 23, 2023
1 parent 083d3b3 commit 657993f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ FROM python:3.10-slim as dependencies
RUN python3 -m venv /venv
ARG PATH="/venv/bin:$PATH"
RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip setuptools

# Install requirements
RUN --mount=type=cache,target=/root/.cache/pip pip install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu118

Expand Down
6 changes: 6 additions & 0 deletions Dockerfile.no_model
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ FROM python:3.10-slim as dependencies
RUN python3 -m venv /venv
ARG PATH="/venv/bin:$PATH"
RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip setuptools

# Install requirements
RUN --mount=type=cache,target=/root/.cache/pip pip install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu118

Expand All @@ -30,6 +31,11 @@ COPY --link --from=dependencies /venv /venv
ARG PATH="/venv/bin:$PATH"
ENV PATH=${PATH}

# Missing dependencies for arm64
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
apt-get install -y --no-install-recommends libgomp1 libsndfile1; \
fi

# Non-root user
RUN useradd -m -s /bin/bash appuser \
&& mkdir -p /cache \
Expand Down

0 comments on commit 657993f

Please sign in to comment.