You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DockerFile issue when building the docker image #62
More specifically pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample'] (arm64) and on amd64 it complains about AV_CODEC_CAP_OTHER_THREADS being undeclared
ERROR: failed to solve: process "/bin/bash -c pip install --no-cache-dir "poetry==1.7.1" && poetry config virtualenvs.create false && poetry install --no-interaction --no-root && poetry cache clear --all ." did not complete successfully: exit code: 1
Is there anyway to fix the DockerFile in git to make it work? I try to perform using custom nvidia + python in docker container install but no luck since RVC only support python < 3.12, and find out lots of issues during the docker build process.
@felixchan68 take this one and modify as needed (tested only on arm64)
FROM python:3.10-slim
ARG UID=1000
ARG GID=1000
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt update && \
apt install -y \
build-essential g++ \
libsndfile1-dev libavformat-dev libavdevice-dev ffmpeg git && \
apt clean && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -g ${GID} user && \
useradd -m -u ${UID} -g ${GID} -s /bin/bash user
USER user
WORKDIR /home/user
# 1) CloneRUN git clone --depth=1 https://github.com/RVC-Project/Retrieval-based-Voice-Conversion RVC
# 2) Patch pyproject to bump avRUN sed -Ei 's/av = "\^11\.[^"]*"/av = "^16.0.0"/' /home/user/RVC/pyproject.toml
# 3) Install the projectWORKDIR /home/user/RVC
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install .
# 4) Add rvc to PATHENV PATH=/home/user/.local/bin:${PATH}
ENTRYPOINT ["rvc"]
P.S. post more of the error in the future, you only posted the Dockerfile command that went wrong not why, though I suspect it's AV issues
Example from Dockerfile in this repo using docker build --progress=plain:
#16 196.2 src/av/codec/codec.c:7180:49: error: ‘AV_CODEC_CAP_OTHER_THREADS’ undeclared (first use in this function); d
id you mean ‘AV_CODEC_CAP_SLICE_THREADS’?
#16 196.2 7180 | __pyx_t_9 = __Pyx_PyLong_From___pyx_anon_enum(AV_CODEC_CAP_OTHER_THREADS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
#16 196.2 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
#16 196.2 | AV_CODEC_CAP_SLICE_THREADS
#16 196.2 src/av/codec/codec.c:7180:49: note: each undeclared identifier is reported only once for each function it appears in
#16 196.2 error: command '/usr/bin/gcc' failed with exit code 1
Execution result:
/home/user/.local/lib/python3.10/site-packages/pyworld/init.py:13: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
2025-11-19 08:09:00 | INFO | rvc.configs.config | Found GPU NVIDIA GeForce RTX 5060 Ti
2025-11-19 08:09:00 | INFO | rvc.configs.config | Use None instead
2025-11-19 08:09:00 | INFO | rvc.configs.config | is_half:True, device:cuda:0
2025-11-19 08:09:00 | INFO | rvc.modules.vc.modules | Get sid: egirl.pth
2025-11-19 08:09:00 | INFO | rvc.modules.vc.modules | Loading: /weights/egirl.pth
/home/user/.local/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:144: FutureWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
WeightNorm.apply(module, name, dim)
Traceback (most recent call last):
File "/home/user/.local/bin/rvc", line 7, in
sys.exit(main())
File "/home/user/.local/lib/python3.10/site-packages/rvc/wrapper/cli/cli.py", line 29, in main
cli()
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1485, in call
return self.main(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1406, in main
rv = self.invoke(ctx)
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1873, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 824, in invoke
return callback(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/rvc/wrapper/cli/handler/infer.py", line 114, in infer
vc.get_vc(modelpath)
File "/home/user/.local/lib/python3.10/site-packages/rvc/modules/vc/modules.py", line 92, in get_vc
index = get_index_path_from_model(sid)
File "/home/user/.local/lib/python3.10/site-packages/rvc/modules/vc/utils.py", line 12, in get_index_path_from_model
for root, _, files in os.walk(os.getenv("index_root"), topdown=False)
File "/usr/local/lib/python3.10/os.py", line 343, in walk
return _walk(fspath(top), topdown, onerror, followlinks)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Activity
sebi2306 commentedon Nov 6, 2025
More specifically
pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample'](arm64) and on amd64 it complains about AV_CODEC_CAP_OTHER_THREADS being undeclaredtqk2811 commentedon Nov 10, 2025
add this to Dockerfile (amd64)
Full Dockerfile
felixchan68 commentedon Nov 11, 2025
@tqk2811
Thanks, but still got the same error:
Dockerfile:44
43 |
44 | >>> RUN pip install
45 | >>> --no-cache-dir
46 | >>> "poetry==1.7.1" &&
47 | >>> poetry config virtualenvs.create false &&
48 | >>> poetry install
49 | >>> --no-interaction
50 | >>> --no-root &&
51 | >>> poetry cache clear --all .
52 |
ERROR: failed to solve: process "/bin/bash -c pip install --no-cache-dir "poetry==1.7.1" && poetry config virtualenvs.create false && poetry install --no-interaction --no-root && poetry cache clear --all ." did not complete successfully: exit code: 1
Is there anyway to fix the DockerFile in git to make it work? I try to perform using custom nvidia + python in docker container install but no luck since RVC only support python < 3.12, and find out lots of issues during the docker build process.
sebi2306 commentedon Nov 11, 2025
@felixchan68 take this one and modify as needed (tested only on arm64)
P.S. post more of the error in the future, you only posted the Dockerfile command that went wrong not why, though I suspect it's AV issues
Example from Dockerfile in this repo using
docker build --progress=plain:rsxdalv commentedon Nov 13, 2025
Context - av deleted their wheels for version 11 (due to pypi limitations) that's why it suddenly broke
felixchan68 commentedon Nov 19, 2025
@sebi2306 Thank you very much and its amazingly work. The docker image can be successfully built.
Unfortunitely I experienced another issue. I simply try to execute the rvc but error message comes out. Did I make any mistakes?
docker run -it --name rvc --gpus all -p 8000:8000 -v ./data/assets/weights:/weights:ro -v ./data/assets/indices:/indices:ro -v ./data/assets/audios:/audios rvc infer -m /weights/egirl.pth -i /audios/test.wav -o /audios/test_out.wav -if /indices/egirl.index
Execution result:
/home/user/.local/lib/python3.10/site-packages/pyworld/init.py:13: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
2025-11-19 08:09:00 | INFO | rvc.configs.config | Found GPU NVIDIA GeForce RTX 5060 Ti
2025-11-19 08:09:00 | INFO | rvc.configs.config | Use None instead
2025-11-19 08:09:00 | INFO | rvc.configs.config | is_half:True, device:cuda:0
2025-11-19 08:09:00 | INFO | rvc.modules.vc.modules | Get sid: egirl.pth
2025-11-19 08:09:00 | INFO | rvc.modules.vc.modules | Loading: /weights/egirl.pth
/home/user/.local/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:144: FutureWarning:
torch.nn.utils.weight_normis deprecated in favor oftorch.nn.utils.parametrizations.weight_norm.WeightNorm.apply(module, name, dim)
Traceback (most recent call last):
File "/home/user/.local/bin/rvc", line 7, in
sys.exit(main())
File "/home/user/.local/lib/python3.10/site-packages/rvc/wrapper/cli/cli.py", line 29, in main
cli()
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1485, in call
return self.main(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1406, in main
rv = self.invoke(ctx)
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1873, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/user/.local/lib/python3.10/site-packages/click/core.py", line 824, in invoke
return callback(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/rvc/wrapper/cli/handler/infer.py", line 114, in infer
vc.get_vc(modelpath)
File "/home/user/.local/lib/python3.10/site-packages/rvc/modules/vc/modules.py", line 92, in get_vc
index = get_index_path_from_model(sid)
File "/home/user/.local/lib/python3.10/site-packages/rvc/modules/vc/utils.py", line 12, in get_index_path_from_model
for root, _, files in os.walk(os.getenv("index_root"), topdown=False)
File "/usr/local/lib/python3.10/os.py", line 343, in walk
return _walk(fspath(top), topdown, onerror, followlinks)
TypeError: expected str, bytes or os.PathLike object, not NoneType