fastai / docker-containers

Docker images for fastai
https://hub.docker.com/u/fastai
Apache License 2.0
173 stars 41 forks source link

fastai/fastai:latest, apt-get update, GitHub PPA missing Release file for Ubuntu Jammy #73

Open LTeder opened 2 years ago

LTeder commented 2 years ago

Hello!

I'm using the Docker container fastai:fastai/latest for a project I'm working on. I need to install the onnxruntime-gpu and opencv-python-headless packages using pip. I thought I needed some extra dependencies from apt, so I attempted to update the package list before installing, but this threw an error.

Dockerfile:

FROM fastai/fastai:latest

RUN apt-get update

ENTRYPOINT ["/bin/bash", "-c"]

This fails as so:

Terminal Output ``` user@computer:/mnt/c/Users/user/Desktop/test$ docker build -t test . [+] Building 5.8s (6/6) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 204B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/fastai/fastai:latest 0.7s => CACHED [1/3] FROM docker.io/fastai/fastai:latest@sha256:2cf8a1564a65c14dd90670e4a5796cb24352f9d27676932dc2c3 0.0s => [2/3] WORKDIR /app 0.0s => ERROR [3/3] RUN apt-get update 5.1s ------ > [3/3] RUN apt-get update: #5 0.445 Ign:1 https://cli.github.com/packages jammy InRelease #5 0.464 Err:2 https://cli.github.com/packages jammy Release #5 0.464 404 Not Found [IP: 185.199.111.153 443] #5 0.481 Get:3 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB] #5 0.603 Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] #5 0.750 Get:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB] #5 0.814 Get:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB] #5 0.877 Get:7 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB] #5 0.936 Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB] #5 1.147 Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [322 kB] #5 1.151 Get:10 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB] #5 2.293 Get:11 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [4644 B] #5 2.303 Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [132 kB] #5 2.628 Get:13 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB] #5 2.640 Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [650 kB] #5 2.695 Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [265 kB] #5 2.717 Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [363 kB] #5 2.748 Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [7791 B] #5 2.749 Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [6909 B] #5 3.658 Get:19 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [340 kB] #5 4.567 Reading package lists... #5 5.019 E: The repository 'https://cli.github.com/packages jammy Release' does not have a Release file. ------ executor failed running [/bin/sh -c apt-get update]: exit code: 100 ```

The build fails because the GitHub CLI PPA has no release file for Ubuntu 22.04 LTS ‘Jammy Jellyfish.’ In the Dockerfile, I remove this repository before pulling updates, which fixes the build error.

Dockerfile:

FROM fastai/fastai:latest

RUN add-apt-repository -r https://cli.github.com/packages
RUN apt-get update

ENTRYPOINT ["/bin/bash", "-c"]

I had one of those moments where the original problem was fixed while I worked on this nested problem. I thought I should bring it to your attention nonetheless.

I'd also like to say: I've been using fastai for over a year now. Many thanks for developing such a great module along with fastbook and nbdev. They've all been great assets as I've learned about neural networks and modern software development.