Skip to content

Commit

Permalink
Merge pull request #4873 from voxel51/release/v1.0.0
Browse files Browse the repository at this point in the history
Release/v1.0.0
  • Loading branch information
findtopher authored Oct 1, 2024
2 parents 606694a + 169c3b3 commit 739d6b1
Show file tree
Hide file tree
Showing 513 changed files with 32,602 additions and 12,475 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
path: package/db/dist/*.whl

test:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: build
env:
FIFTYONE_DO_NOT_TRACK: true
Expand All @@ -90,16 +90,20 @@ jobs:
with:
name: dist-sdist
path: downloads
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install fiftyone-db
run: |
pip3 install downloads/fiftyone_db-*.tar.gz
pip install downloads/fiftyone_db-*.tar.gz
- name: Install test dependencies
run: |
pip3 install pytest
pip install pytest
- name: Run tests
run: |
cd package/db/
python3 -m pytest --verbose tests/
python -m pytest --verbose tests/
publish:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ jobs:
path: fiftyone-teams
token: ${{ secrets.TEAMS_GITHUB_PAT }}
ref: main
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Install pip dependencies
run: |
pip install --upgrade pip setuptools wheel build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
git checkout develop
git pull origin merge/${{ inputs.ref_name || github.ref_name }} --no-rebase
git pull origin ${{ inputs.ref_name || github.ref_name }} --no-rebase
- uses: peter-evans/create-pull-request@v6
- uses: peter-evans/create-pull-request@v7
with:
author: voxel51-bot <bot@voxel51.com>
token: ${{ secrets.FIFTYONE_GITHUB_TOKEN }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ jobs:
- ubuntu-latest-m
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
exclude:
- os: windows-latest
python: "3.8"
- os: windows-latest
python: "3.9"
- os: windows-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ __pycache__
build/
dist/

/fiftyone-brain/
/eta/

/docs/build/
Expand Down
127 changes: 53 additions & 74 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,81 +1,45 @@
# Dockerfile for building an image with a source FiftyOne install atop a
# Debian-based Linux distribution.
# Copyright 2017-2024, Voxel51, Inc.
# voxel51.com
#
# By default, Ubuntu 20.04 and Python 3.8 are used, but these can be customized
# via ARGs.
# Dockerfile for building an image with source FiftyOne atop a Python 3.11
# base image
#
# ARGs::
#
# BASE_IMAGE (ubuntu:20.04): The Debian-based image to build from
# PYTHON_VERSION (3.8): The Python version to install
# PIP_INDEX_URL (https://pypi.org/simple): Allow the use of caching proxies
# PYTHON_VERSION (3.11): The Python base image to use
# ROOT_DIR (/fiftyone): The name of the directory within the container that
# should be mounted when running
#
# Example usage::
#
# # Build
# make python
# docker build -t voxel51/fiftyone .
# make docker
#
# # Run
# SHARED_DIR=/path/to/shared/dir
# docker run \
# -v ${SHARED_DIR}:/fiftyone \
# -p 5151:5151 \
# -it voxel51/fiftyone
#
# Copyright 2017-2022, Voxel51, Inc.
# voxel51.com
# -it local/fiftyone
#

# The base image to build from; must be Debian-based (eg Ubuntu)
ARG BASE_IMAGE=ubuntu:20.04
FROM $BASE_IMAGE
# The base python image to build from
ARG PYTHON_VERSION=3.11

# The Python version to install
ARG PYTHON_VERSION=3.8
# Collect wheels for future installation
FROM python:${PYTHON_VERSION} AS builder
ARG PIP_INDEX_URL=https://pypi.org/simple

#
# Install system packages
#
COPY dist dist

RUN apt -y update \
&& apt -y --no-install-recommends install software-properties-common \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt -y update \
&& apt -y upgrade \
&& apt -y --no-install-recommends install tzdata \
&& TZ=Etc/UTC \
&& apt -y --no-install-recommends install \
build-essential \
ca-certificates \
cmake \
cmake-data \
pkg-config \
libcurl4 \
libsm6 \
libxext6 \
libssl-dev \
libffi-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
unzip \
curl \
wget \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev \
python${PYTHON_VERSION}-distutils \
ffmpeg \
&& ln -s /usr/bin/python${PYTHON_VERSION} /usr/local/bin/python \
&& ln -s /usr/local/lib/python${PYTHON_VERSION} /usr/local/lib/python \
&& curl https://bootstrap.pypa.io/get-pip.py | python \
&& rm -rf /var/lib/apt/lists/*
RUN pip --no-cache-dir install -q -U pip setuptools wheel \
&& pip wheel --wheel-dir=/wheels \
dist/*.whl \
ipython

#
# Install Python dependencies
#
# Other packages you might want:
# Other packages you might want to add to the list above:
# torch torchvision: Torch model training/zoo datasets
# tensorflow tensorflow-datasets: TF model training/zoo datasets
# pycocotools: COCO-style evaluation
Expand All @@ -88,36 +52,51 @@ RUN apt -y update \
# pydicom: DICOM images
#

RUN pip --no-cache-dir install --upgrade pip setuptools wheel ipython

#
# Install FiftyOne from source
#

COPY dist dist
RUN pip --no-cache-dir install dist/*.whl && rm -rf dist

# Use this instead if you want the latest FiftyOne release
# RUN pip --no-cache-dir install fiftyone

#
# Configure shared storage
#
# Create a smaller image with wheels installed
FROM python:${PYTHON_VERSION}-slim AS final
ARG PIP_INDEX_URL=https://pypi.org/simple

# The name of the shared directory in the container that should be
# volume-mounted by users to persist data loaded into FiftyOne
ARG ROOT_DIR=/fiftyone

WORKDIR /opt

ENV FIFTYONE_DATABASE_DIR=${ROOT_DIR}/db \
FIFTYONE_DEFAULT_APP_ADDRESS='0.0.0.0' \
FIFTYONE_DEFAULT_DATASET_DIR=${ROOT_DIR}/default \
FIFTYONE_DATASET_ZOO_DIR=${ROOT_DIR}/zoo/datasets \
FIFTYONE_MODEL_ZOO_DIR=${ROOT_DIR}/zoo/models
FIFTYONE_MODEL_ZOO_DIR=${ROOT_DIR}/zoo/models \
VIRTUAL_ENV=/opt/.fiftyone-venv
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"

# Update the base image and install ffmpeg
RUN apt-get -qq -y update && apt-get -qq -y upgrade \
&& apt-get -qq install -y --no-install-recommends ffmpeg libcurl4 php-curl \
&& apt clean && rm -rf /var/lib/apt/lists/*

# Create Virtual Env
RUN python -m venv "${VIRTUAL_ENV}"

# Install wheels from builder stage
RUN --mount=type=cache,from=builder,target=/builder,ro \
pip --no-cache-dir install -q -U pip setuptools wheel \
&& pip --no-cache-dir install -q --pre --no-index \
--find-links=/builder/wheels \
/builder/wheels/*

#
# Default behavior
# Default, interactive, behavior
#

CMD ipython
CMD [ "ipython" ]

# Use this if you want the default behavior to instead be to launch the App
# CMD python /usr/local/lib/python/dist-packages/fiftyone/server/main.py --port 5151
# Use this if want the default behavior to launch the App instead
# EXPOSE 5151
# CMD [ \
# "python", \
# ".fiftyone-venv/lib/python3.11/site-packages/fiftyone/server/main.py", \
# "--port", \
# "5151" \
# ]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ python: app clean
@python -Im build

docker: python
@docker build -t voxel51/fiftyone .
@docker build -t local/fiftyone .

docker-export: docker
@docker save voxel51/fiftyone:latest | gzip > fiftyone.tar.gz
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ FiftyOne.

## Contributing to FiftyOne

FiftyOne is open source and community contributions are welcome!
FiftyOne and [FiftyOne Brain](https://github.com/voxel51/fiftyone-brain) are
open source and community contributions are welcome!

Check out the
[contribution guide](https://github.com/voxel51/fiftyone/blob/develop/CONTRIBUTING.md)
Expand All @@ -132,12 +133,12 @@ to make adjustments. If you are working in Google Colab,

You will need:

- [Python](https://www.python.org) (3.8 - 3.11)
- [Python](https://www.python.org) (3.9 - 3.11)
- [Node.js](https://nodejs.org) - on Linux, we recommend using
[nvm](https://github.com/nvm-sh/nvm) to install an up-to-date version.
- [Yarn](https://yarnpkg.com) - once Node.js is installed, you can
[enable Yarn](https://yarnpkg.com/getting-started/install) via
`corepack enable`
`corepack enable`
- On Linux, you will need at least the `openssl` and `libcurl` packages. On
Debian-based distributions, you will need to install `libcurl4` or
`libcurl3` instead of `libcurl`, depending on the age of your distribution.
Expand Down Expand Up @@ -245,22 +246,6 @@ Refer to
to see how to build and run Docker images containing source or release builds
of FiftyOne.

### UI Development on Storybook

Voxel51 is currently in the process of implementing a
[Storybook](https://storybook.js.org/) which contains examples of its basic UI
components. You can access the current storybook instances by running **yarn
storybook** in **/app/packages/components**. While the storybook instance is
running, any changes to the component will trigger a refresh in the storybook
app.

```shell
%%shell

cd /app/packages/components
yarn storybook
```

### Generating documentation

See the
Expand All @@ -272,7 +257,7 @@ for information on building and contributing to the documentation.
You can uninstall FiftyOne as follows:

```shell
pip uninstall fiftyone fiftyone-brain fiftyone-db fiftyone-desktop
pip uninstall fiftyone fiftyone-brain fiftyone-db
```

## Contributors
Expand Down
3 changes: 1 addition & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"doc": "./gen-docs.sh",
"lint:prettify": "prettier --config ../.prettierrc.js --ignore-path ../.prettierignore --write \"packages/**/*.(ts|js|jsx|tsx|json|css|scss)\"",
"start": "yarn workspace @fiftyone/app start",
"start-desktop": "yarn workspace FiftyOne start-desktop",
"test": "yarn vitest run",
"test-ui": "yarn vitest --ui --coverage",
"gen:schema": "strawberry export-schema fiftyone.server.app:schema > schema.graphql"
Expand All @@ -43,7 +42,7 @@
"typedoc": "^0.23.21",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^5.2.12",
"vite": "^5.2.14",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-relay": "^2.0.0",
"vitest": "^2.0.5"
Expand Down
2 changes: 1 addition & 1 deletion app/packages/aggregations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"lodash": "^4.17.21",
"prettier": "2.2.1",
"typescript": "4.2.4",
"vite": "^5.2.12"
"vite": "^5.2.14"
}
}
Loading

0 comments on commit 739d6b1

Please sign in to comment.