facebookresearch / facebookresearch/sam2
[BUG] failed to solve: rm /opt/conda/bin/ffmpeg && ln -s /bin/ffmpeg /opt/conda/bin/ffmpeg
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
When I use `docker compose build` I encounter the following problem:
```plaintext
------
> [backend 7/15] RUN rm /opt/conda/bin/ffmpeg && ln -s /bin/ffmpeg /opt/conda/bin/ffmpeg:
0.117 rm: cannot remove '/opt/conda/bin/ffmpeg': No such file or directory
------
failed to solve: process "/bin/sh -c rm /opt/conda/bin/ffmpeg && ln -s /bin/ffmpeg /opt/conda/bin/ffmpeg" did not complete successfully: exit code: 1
```
I found that changing
```dockerfile
RUN rm /opt/conda/bin/ffmpeg && ln -s /bin/ffmpeg /opt/conda/bin/ffmpeg
```
to
```dockerfile
RUN [ -f /opt/conda/bin/ffmpeg ] && rm /opt/conda/bin/ffmpeg; ln -s /bin/ffmpeg /opt/conda/bin/ffmpeg
```
resolves the issue.
Contributor guide
Assessment
This issue has not been assessed yet.