facebookresearch / facebookresearch/sam2

[BUG] failed to solve: rm /opt/conda/bin/ffmpeg && ln -s /bin/ffmpeg /opt/conda/bin/ffmpeg

Open
#584 2 comments 22 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.