Skip to content

Commit

Permalink
Fix ffmpeg in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
billbrod committed Jul 11, 2024
1 parent 47b45b0 commit 2f0281a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 4 additions & 3 deletions binder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM --platform=linux/amd64 pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y python3-dev python3-pip
RUN apt update && apt install -y python3-dev python3-pip git-all

# to get docker image working for binder
ARG NB_USER=jovyan
Expand All @@ -17,8 +17,9 @@ RUN adduser --disabled-password \
COPY . ${HOME}
RUN pip3 install jupyterlab notebook jupyterhub
RUN pip3 install -r ${HOME}/plenoptic-cshl-vision-2024/requirements.txt
RUN python3 ${HOME}/scripts/setup.py
RUN python3 ${HOME}/plenoptic-cshl-vision-2024/scripts/setup.py
RUN conda update ffmpeg
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
WORKDIR ${HOME}
WORKDIR ${HOME}/plenoptic-cshl-vision-2024
12 changes: 10 additions & 2 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ While we'll use the binder during this tutorial, if you'd like to run the notebo
cd plenoptic-cshl-vision-2024
pip install -r requirements.txt
```

:::{important}
You will also need `ffmpeg` installed in order to view the videos in the notebook. This is likely installed on your system already if you are on Linux or Mac (run `ffmpeg` in your command line to check). If not, you can install it via conda: `conda install -c conda-forge ffmpeg` or see their [install instructions](https://ffmpeg.org/download.html).

If you have `ffmpeg` installed and are still having issues, try running `conda update ffmpeg`.

:::

5. Run the setup script to prepare the notebook:
```shell
python scripts/setup.py
Expand All @@ -52,9 +60,9 @@ Some usage notes:
- You are only allowed to have a single binder instance running at a time, so if you get the "already have an instance running error", go to the [binderhub page](https://binder.flatironinstitute.org/hub/hub/home) (or click on "check your currently running servers" on the right of the page) to join your running instance.
- If you lose connection halfway through the workshop, go to the [binderhub page](https://binder.flatironinstitute.org/hub/hub/home) to join your running instance rather than restarting the image.
- This is important because if you restart the image, **you will lose all data and progress**. If this happens, see [this page](https://flatironinstitute.github.io/ccn-software-fens-2024/generated/just_code/) for notebooks that have the code to copy.
- This is important because if you restart the image, **you will lose all data and progress**.
- The binder will be shutdown automatically after 1 day of inactivity or 7 days of total usage. Data will not persist after the binder instance shuts down, so **please download any notebooks** you want to keep.
- I will destroy this instance in 2 weeks, so that you can use it to play around during the course. You can download your notebooks to keep them after the fact.
- I will destroy this instance in 2 weeks, so that you can use it to play around during the course. You can download your notebooks to keep them after the fact. If you do so, see the [setup instructions](#setup) for how to create the environment for running them locally, and let me know if you have any problems!
## Contents
Expand Down

0 comments on commit 2f0281a

Please sign in to comment.