mirror of
https://github.com/cmusphinx/pocketsphinx.git
synced 2026-05-17 12:20:35 +00:00
fix: run as root in dockerfile so audio can work
This commit is contained in:
+2
-5
@@ -1,5 +1,5 @@
|
||||
FROM alpine:latest as runtime
|
||||
RUN apk add --no-cache python3 py3-pip sox
|
||||
RUN apk add --no-cache python3 py3-pip sox portaudio alsa-utils alsaconf
|
||||
|
||||
FROM runtime as build
|
||||
RUN apk add --no-cache cmake ninja gcc musl-dev python3-dev pkgconfig
|
||||
@@ -13,10 +13,7 @@ RUN CMAKE_ARGS="-DUSE_INSTALLED_POCKETSPHINX=ON" pip wheel -v .
|
||||
FROM runtime
|
||||
COPY --from=build /usr/local/ /usr/local/
|
||||
COPY --from=build /pocketsphinx/*.whl /
|
||||
RUN pip install /*.whl && rm /*.whl
|
||||
RUN pip install --break-system-packages /*.whl && rm /*.whl
|
||||
|
||||
RUN adduser -u 1000 -DHD pocketsphinx && adduser pocketsphinx audio
|
||||
COPY examples/ /work/examples/
|
||||
RUN chown -R pocketsphinx:pocketsphinx /work
|
||||
USER pocketsphinx
|
||||
WORKDIR /work
|
||||
|
||||
Reference in New Issue
Block a user