fiftyone
fiftyone copied to clipboard
[FR] Document how to install FiftyOne on Ubuntu 22.04
MongoDB has issues on Ubuntu 22.04: https://askubuntu.com/q/1403619
We need to document a recommend approach(es) for installing FiftyOne on Ubuntu 22.04, which may include:
- Workarounds to install MongoDB manually
- Run MongoDB in a Docker
- Run all of FiftyOne in a Docker
Here are a variety of relevant places in the existing documentation:
-
Troubleshooting section of the install page. Our recommended solution for installing on Ubuntu 22.04 should be directly listed (or linked to) from here: https://voxel51.com/docs/fiftyone/getting_started/install.html#troubleshooting
-
Spillover page where more complex install troubleshooting descriptions live: https://voxel51.com/docs/fiftyone/getting_started/troubleshooting.html#troubleshooting
-
Some install environments (eg Apple Silicon) require installing and running MongoDB manually; this is currently documented here: https://voxel51.com/docs/fiftyone/user_guide/config.html#configuring-a-mongodb-connection
-
Instructions from the README regarding running (all of) FiftyOne inside Docker: https://github.com/voxel51/fiftyone#docker-installs
-
Docs page discussing how to work with FiftyOne in different environments. It may make sense to add a Docker section here: https://voxel51.com/docs/fiftyone/environments/index.html
Users have reported success getting MongoDB (and hence FiftyOne) running on Ubuntu 22.04 as follows:
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb -O libsll.deb \
&& dpkg -i libsll.deb
For reference, the actual error observed when trying to import FiftyOne on Ubuntu 22.04 is the following:
>> import fiftyone
fiftyone.core.service.ServiceListenTimeout: fiftyone.core.service.DatabaseService failed to bind to port
I was getting the same error.
Here is what worked for me when installing on ubuntu and pop.os 22.04 with miniconda and python 3.10 (inside a conda virtual env).
Note: paraphrasing the steps. Adjust to your system and preferences.
You need to install libssl
Get the package from the current website -- the one above is no longer active/working
. You can manually download it to a local directory (e.g., Install/) or use the following commands:
cd ~/Install
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.21_amd64.deb
sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.21_amd64.deb
Follow the prompt to install... and now you can complete the setup and run the fiftyone quickstart
For reference, here's how to run MongoDB 6.0 in a Docker container:
docker run --name mongo --rm -v $HOME/.fiftyone/var/lib/mongo:/data/db -d -p 27017:27017 mongo:6.0.4-jammy
and configure FiftyOne to use the custom database:
cat <<EOF > $HOME/.fiftyone/config.json
{
"database_uri": "mongodb://localhost:27017"
}
EOF
I was getting the same error.
Here is what worked for me when installing on ubuntu and pop.os 22.04 with miniconda and python 3.10 (inside a conda virtual env).
Note: paraphrasing the steps. Adjust to your system and preferences.
You need to install libssl
Get the package from the current website -- the one above is
no longer active/working
. You can manually download it to a local directory (e.g., Install/) or use the following commands:cd ~/Install wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.21_amd64.deb sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.21_amd64.deb
Follow the prompt to install... and now you can complete the setup and run the fiftyone quickstart
So you are installing an ubuntu's 18.04 lib inside ubuntu 22.04 and you have no problem with that. It's totally dirty with security considerations ! Does the firtyone team's not able to build a newer version of mongod binary inside their pip package ? A better option is not to embedded this mongod binary and let user install in prerequisites ...
Culprit is here : https://github.com/voxel51/fiftyone/blob/develop/package/db/setup.py#L29
Hardlink instead of dynamic from sys
module
Btw, mongod 5 is not available through these links for ubuntu 22.04. It starts since version 6
These lines are useless : https://github.com/voxel51/fiftyone/blob/develop/package/db/setup.py#L40-L41
They are used in other part of the script
May be a CI/CD would be welcome ... last updates from these dockerfiles : 2 years ago. Looks like an abandonned project whereas some company and public institutions pay for it ! https://github.com/voxel51/fiftyone/tree/develop/package/test-envs/dockerfiles
@kikislater what exactly do you think is the problem tho just that the files are old? looking over the lines there is nothing they need to change since it will still install the latest versions? and these are test environments.
also how can you say "these lines are useless" when you afterwards say they are used right after. If you have made a typo here is the location where its used: https://github.com/voxel51/fiftyone/blob/7e5cd9dbb62324eb0c73311424cc41d2e6102e1b/package/db/setup.py#L133
Pardon the silence. Current solution for Ubuntu 22.04 installs is documented here.
A general solution I propose to remove fiftyone-db
and related packages can be tracked here.
For clarity, the current solution is to install FiftyOne like so:
pip install fiftyone
pip install fiftyone-db-ubuntu2204
See also: #3321, #3236, #2961, #2900, #2737, #2480, #1803
Pardon the silence. Current solution for Ubuntu 22.04 installs is documented here.
A general solution I propose to remove
fiftyone-db
and related packages can be tracked here.
I believe the second link is incorrect (it redirects to here actually). The right link, discussing the dynamic installation of fiftyone-db is here : https://github.com/voxel51/fiftyone/issues/3236