forked from voxel51/fiftyone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/databricks
- Loading branch information
Showing
102 changed files
with
9,581 additions
and
1,592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# Dockerfile for building an image with a source FiftyOne install atop a | ||
# Debian-based Linux distribution. | ||
# | ||
# By default, Ubuntu 20.04 and Python 3.8 are used, but these can be customized | ||
# via ARGs. | ||
# | ||
# ARGs:: | ||
# | ||
# BASE_IMAGE (ubuntu:20.04): The Debian-based image to build from | ||
# PYTHON_VERSION (3.8): The Python version to install | ||
# 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 . | ||
# | ||
# # 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 | ||
# | ||
|
||
# The base image to build from; must be Debian-based (eg Ubuntu) | ||
ARG BASE_IMAGE=ubuntu:20.04 | ||
FROM $BASE_IMAGE | ||
|
||
# The Python version to install | ||
ARG PYTHON_VERSION=3.8 | ||
|
||
# | ||
# Install system packages | ||
# | ||
|
||
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/* | ||
|
||
# | ||
# Install Python dependencies | ||
# | ||
# Other packages you might want: | ||
# torch torchvision: Torch model training/zoo datasets | ||
# tensorflow tensorflow-datasets: TF model training/zoo datasets | ||
# pycocotools: COCO-style evaluation | ||
# notebook>=5.3 ipywidgets>=7.5: Jupyter notebooks | ||
# flash>=0.4: Lightning Flash integration | ||
# apache_beam: Apache Beam integration | ||
# labelbox: Labelbox integration | ||
# shapely: Polyline evaluation | ||
# rasterio: GeoTIFF images | ||
# 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 | ||
|
||
# | ||
# Configure shared storage | ||
# | ||
|
||
# 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 | ||
|
||
ENV FIFTYONE_DATABASE_DIR=${ROOT_DIR}/db \ | ||
FIFTYONE_DEFAULT_DATASET_DIR=${ROOT_DIR}/default \ | ||
FIFTYONE_DATASET_ZOO_DIR=${ROOT_DIR}/zoo/datasets \ | ||
FIFTYONE_MODEL_ZOO_DIR=${ROOT_DIR}/zoo/models | ||
|
||
# | ||
# Default behavior | ||
# | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.PHONY: app python docker docker-export | ||
|
||
.DEFAULT_GOAL := docker-export | ||
|
||
app: | ||
@cd app && yarn && yarn build && cd .. | ||
|
||
python: app | ||
@python setup.py sdist bdist_wheel | ||
|
||
docker: python | ||
@docker build -t voxel51/fiftyone . | ||
|
||
docker-export: docker | ||
@docker save voxel51/fiftyone:latest | gzip > fiftyone.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.