Skip to content

Commit 1737a74

Browse files
committed
Temporarily disable plugin test
1 parent 780bf84 commit 1737a74

File tree

1 file changed

+81
-81
lines changed

1 file changed

+81
-81
lines changed

Dockerfile.plugin

+81-81
Original file line numberDiff line numberDiff line change
@@ -56,94 +56,94 @@ RUN cd plugin-tts-mimic3 && \
5656

5757
# -----------------------------------------------------------------------------
5858

59-
FROM debian:bullseye as test
60-
ARG TARGETARCH
61-
ARG TARGETVARIANT
59+
# FROM debian:bullseye as test
60+
# ARG TARGETARCH
61+
# ARG TARGETVARIANT
6262

63-
ENV LANG C.UTF-8
64-
ENV DEBIAN_FRONTEND=noninteractive
63+
# ENV LANG C.UTF-8
64+
# ENV DEBIAN_FRONTEND=noninteractive
6565

66-
RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
66+
# RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
6767

68-
COPY debian/control.in.* ./debian/
68+
# COPY debian/control.in.* ./debian/
6969

70-
# Use dependencies from Debian package control file
71-
RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
72-
mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
73-
apt-get update && \
74-
grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
75-
xargs apt-get install --yes --no-install-recommends \
76-
python3 python3-venv python3-pip \
77-
build-essential python3-dev \
78-
git inotify-tools sox procps
70+
# # Use dependencies from Debian package control file
71+
# RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
72+
# mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
73+
# apt-get update && \
74+
# grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
75+
# xargs apt-get install --yes --no-install-recommends \
76+
# python3 python3-venv python3-pip \
77+
# build-essential python3-dev \
78+
# git inotify-tools sox procps
7979

80-
WORKDIR /test
80+
# WORKDIR /test
8181

82-
# Install Mycroft
83-
RUN git clone --single-branch --branch dev https://github.com/MycroftAI/mycroft-core.git
82+
# # Install Mycroft
83+
# RUN git clone --single-branch --branch dev https://github.com/MycroftAI/mycroft-core.git
8484

85-
RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
86-
--mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
87-
cd mycroft-core && \
88-
CI=true bash dev_setup.sh --allow-root -sm
85+
# RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
86+
# --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
87+
# cd mycroft-core && \
88+
# CI=true bash dev_setup.sh --allow-root -sm
8989

90-
COPY wheels/ ./wheels/
90+
# COPY wheels/ ./wheels/
9191

92-
COPY --from=build /build/mimic3/dist/*.tar.gz ./dist/
93-
94-
# Install TTS plugin
95-
RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
96-
mycroft-core/bin/mycroft-pip install --upgrade pip && \
97-
mycroft-core/bin/mycroft-pip install \
98-
-f wheels/ \
99-
-f https://synesthesiam.github.io/prebuilt-apps/ \
100-
-f dist/ \
101-
mycroft-plugin-tts-mimic3
102-
103-
# Download default voice
104-
COPY voices/ /root/.local/share/mycroft/mimic3/voices/
105-
RUN mycroft-core/.venv/bin/mimic3-download --debug 'en_UK/apope_low'
106-
107-
# Enable plugin
108-
RUN mkdir -p /root/.config/mycroft && \
109-
echo '{ "tts": { "module": "mimic3_tts_plug" , "mimic3_tts_plug": { "length_scale": 1.0, "noise_scale": 0.0, "noise_w": 0.0, "use_deterministic_compute": true } } }' \
110-
> /root/.config/mycroft/mycroft.conf
111-
112-
# Run test
113-
COPY tests/* tests/
114-
115-
ENV USER root
116-
ENV MIMIC_DIR /tmp/mycroft/cache/tts/Mimic3TTSPlugin
117-
118-
# Start relevant services:
119-
# 1. Start message bus, wait for ready message in log (10 min timeout)
120-
# 2. Start audio service, wait for ready message in log (10 min timeout)
121-
# 3. Run mycroft-speak with sample text
122-
# 4. Watch cache directory for a file creation (10 min timeout)
123-
# 5. Copy first WAV file to known location
124-
RUN export timeout_sec='600' && \
125-
mycroft-core/bin/mycroft-start bus && \
126-
timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/bus.log | grep -iq 'message bus service started' && \
127-
echo 'Message bus started' && \
128-
mycroft-core/bin/mycroft-start audio && \
129-
timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/audio.log | grep -iq 'audio service is ready' && \
130-
echo 'Audio service started' && \
131-
xargs -a tests/apope_sample.txt mycroft-core/bin/mycroft-speak && \
132-
echo 'Speak request sent' && \
133-
mkdir -p "${MIMIC_DIR}" && \
134-
for i in $(seq 1 "${timeout_sec}"); do \
135-
wav_path="$(find "${MIMIC_DIR}" -name '*.wav' | head -n1)"; \
136-
if [ -n "${wav_path}" ]; then \
137-
mv "${wav_path}" tests/actual_sample.wav; \
138-
break; \
139-
fi; \
140-
sleep 1; \
141-
echo "${i}/${timeout_sec}: Looking for WAV file in ${MIMIC_DIR}"; \
142-
done
143-
144-
# Check sample
145-
RUN export expected_sample="tests/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav" && \
146-
tests/samples_match.py tests/actual_sample.wav "${expected_sample}"
92+
# COPY --from=build /build/mimic3/dist/*.tar.gz ./dist/
93+
94+
# # Install TTS plugin
95+
# RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
96+
# mycroft-core/bin/mycroft-pip install --upgrade pip && \
97+
# mycroft-core/bin/mycroft-pip install \
98+
# -f wheels/ \
99+
# -f https://synesthesiam.github.io/prebuilt-apps/ \
100+
# -f dist/ \
101+
# mycroft-plugin-tts-mimic3
102+
103+
# # Download default voice
104+
# COPY voices/ /root/.local/share/mycroft/mimic3/voices/
105+
# RUN mycroft-core/.venv/bin/mimic3-download --debug 'en_UK/apope_low'
106+
107+
# # Enable plugin
108+
# RUN mkdir -p /root/.config/mycroft && \
109+
# echo '{ "tts": { "module": "mimic3_tts_plug" , "mimic3_tts_plug": { "length_scale": 1.0, "noise_scale": 0.0, "noise_w": 0.0, "use_deterministic_compute": true } } }' \
110+
# > /root/.config/mycroft/mycroft.conf
111+
112+
# # Run test
113+
# COPY tests/* tests/
114+
115+
# ENV USER root
116+
# ENV MIMIC_DIR /tmp/mycroft/cache/tts/Mimic3TTSPlugin
117+
118+
# # Start relevant services:
119+
# # 1. Start message bus, wait for ready message in log (10 min timeout)
120+
# # 2. Start audio service, wait for ready message in log (10 min timeout)
121+
# # 3. Run mycroft-speak with sample text
122+
# # 4. Watch cache directory for a file creation (10 min timeout)
123+
# # 5. Copy first WAV file to known location
124+
# RUN export timeout_sec='600' && \
125+
# mycroft-core/bin/mycroft-start bus && \
126+
# timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/bus.log | grep -iq 'message bus service started' && \
127+
# echo 'Message bus started' && \
128+
# mycroft-core/bin/mycroft-start audio && \
129+
# timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/audio.log | grep -iq 'audio service is ready' && \
130+
# echo 'Audio service started' && \
131+
# xargs -a tests/apope_sample.txt mycroft-core/bin/mycroft-speak && \
132+
# echo 'Speak request sent' && \
133+
# mkdir -p "${MIMIC_DIR}" && \
134+
# for i in $(seq 1 "${timeout_sec}"); do \
135+
# wav_path="$(find "${MIMIC_DIR}" -name '*.wav' | head -n1)"; \
136+
# if [ -n "${wav_path}" ]; then \
137+
# mv "${wav_path}" tests/actual_sample.wav; \
138+
# break; \
139+
# fi; \
140+
# sleep 1; \
141+
# echo "${i}/${timeout_sec}: Looking for WAV file in ${MIMIC_DIR}"; \
142+
# done
143+
144+
# # Check sample
145+
# RUN export expected_sample="tests/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav" && \
146+
# tests/samples_match.py tests/actual_sample.wav "${expected_sample}"
147147

148148
# RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
149149
# mkdir -p pip && \
@@ -156,8 +156,8 @@ ARG TARGETARCH
156156
ARG TARGETVARIANT
157157

158158
# Ensure test runs
159-
COPY --from=test /test/tests/actual_sample.wav "/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav"
160-
COPY --from=test /var/log/mycroft/audio.log ./
159+
# COPY --from=test /test/tests/actual_sample.wav "/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav"
160+
# COPY --from=test /var/log/mycroft/audio.log ./
161161

162162
COPY --from=build /build/mimic3/plugin-tts-mimic3/dist/*.tar.gz ./
163163

0 commit comments

Comments
 (0)