Xvfb
via PyVirtualDisplay."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "VBS5ycq2ROk4"
},
"outputs": [],
"source": [
"is_colab = 'google.colab' in str(get_ipython()) # for Google Colab"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"executionInfo": {
"elapsed": 7436,
"status": "ok",
"timestamp": 1657448345270,
"user": {
"displayName": "Yoshihisa Nitta",
"userId": "15888006800030996813"
},
"user_tz": -540
},
"id": "SyBCS4PjMn3G",
"outputId": "6119930e-70cc-43e0-e80c-e6cb315a40e5"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"63 packages can be upgraded. Run 'apt list --upgradable' to see them.\n",
"xvfb is already the newest version (2:1.19.6-1ubuntu4.10).\n",
"The following package was automatically installed and is no longer required:\n",
" libnvidia-common-460\n",
"Use 'apt autoremove' to remove it.\n",
"0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.\n"
]
}
],
"source": [
"if is_colab:\n",
" !apt update -qq\n",
" !apt install -qq xvfb\n",
" !pip -q install pyvirtualdisplay"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "pVimOj0LCJYJ"
},
"source": [
"## Animation by displaying images frame by fame"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 328
},
"executionInfo": {
"elapsed": 10747,
"status": "ok",
"timestamp": 1657448355999,
"user": {
"displayName": "Yoshihisa Nitta",
"userId": "15888006800030996813"
},
"user_tz": -540
},
"id": "9nYUGkX-QogR",
"outputId": "84c0e516-f4a1-4f7d-ad93-6c9bebca6ae2"
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcwAAAE3CAYAAAAnjnFcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIs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