Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[tool.black]
line-length = 88
target-version = ['py27', 'py35', 'py36', 'py37']
target-version = ['py27', 'py35', 'py36', 'py37', 'py39']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
19 changes: 16 additions & 3 deletions scripts/Dockerfile-CentOS-6
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ RUN ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enab
ldconfig && \
rm -rf /src/Python-3.9.5*

# Install Python 3.10 from source
WORKDIR /src
RUN curl -O https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tgz
RUN tar xf Python-3.10.11.tgz
WORKDIR /src/Python-3.10.11
RUN ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-loadable-sqlite-extensions && \
make -j4 --quiet && \
make install && \
ldconfig && \
rm -rf /src/Python-3.10.11*

ENV CC="/usr/local/bin/gcc"
ENV CXX="/usr/local/bin/g++"

Expand All @@ -173,17 +184,19 @@ RUN pip3.7 install virtualenv
RUN python3.8 get-pip.py
RUN pip3.8 install virtualenv
RUN python3.9 get-pip.py
RUN pip3.9 install virtualenv
RUN pip3.9 install virtualenv \
RUN python3.10 get-pip.py
RUN pip3.10 install virtualenv
RUN rm -rf /src/get-pip.py

ENV LD="/usr/local/lib64"

# So this is where the real magic happens. Clang has a flag to specify the
# So this is where the real magic happens. Clang has a flag to specify the
# version of libstdc++ `--gcc-toolchain`. In turicreate we don't necessarily
# have a flag to take care of this so we can re-create the expected directory
# structure using the script below. This is effectively creating the structure
# you'd expect when calling yum install gcc-4.*
#
#
# Using `clang -v` you can see the version of gcc that clang picks up
# automatically from `/usr`. If all goes well, this should be the `libstdc++`
# from gcc-4.8.5 and turicreate can build.
Expand Down
40 changes: 40 additions & 0 deletions scripts/Dockerfile-Ubuntu-20.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# vim: set ft=dockerfile:

# This image is intended for testing Turi Create on Ubuntu 20.04.

FROM ubuntu:focal
RUN echo HI
# Prevent apt-get from asking questions and expecting answers
ENV DEBIAN_FRONTEND noninteractive

# Update package database
RUN apt-get update

# Upgrade all possible packages
RUN apt-get -y upgrade

# Install Python 3.6 and 3.7 with apt, as well as
# turicreate and upstream dependencies

RUN apt-get -y install libgomp1 lsb-release npm nodejs doxygen zip

# Install Python 3.8
RUN apt-get -y install software-properties-common
RUN add-apt-repository -y ppa:deadsnakes/ppa
#RUN apt-get update
#RUN apt-get -y install python3.8

# Install Python 3.9
RUN apt-get update
RUN apt-get -y install python3.9 python3.9-distutils

# Install build-essential (needed by numpy, which tries to
# build itself from source on 3.6 and above)
RUN apt-get -y install build-essential libpython3.6-dev libpython3.7-dev libpython3.9-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h

# Install pip and virtualenv
ADD https://bootstrap.pypa.io/get-pip.py /src/get-pip.py
WORKDIR /src
RUN python3.9 get-pip.py
RUN pip3.9 install virtualenv
40 changes: 40 additions & 0 deletions scripts/Dockerfile-Ubuntu-22.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# vim: set ft=dockerfile:

# This image is intended for testing Turi Create on Ubuntu 22.04.

FROM ubuntu:jammy

# Prevent apt-get from asking questions and expecting answers
ENV DEBIAN_FRONTEND noninteractive

# Update package database
RUN apt-get update

# Upgrade all possible packages
RUN apt-get -y upgrade

# Install Python 3.6 and 3.7 with apt, as well as
# turicreate and upstream dependencies

RUN apt-get -y install libgomp1 lsb-release npm nodejs doxygen zip

# Install Python 3.8
RUN apt-get -y install software-properties-common
RUN add-apt-repository -y ppa:deadsnakes/ppa
#RUN apt-get update
#RUN apt-get -y install python3.8

# Install Python 3.9
RUN apt-get update
RUN apt-get -y install python3.9 python3.9-distutils

# Install build-essential (needed by numpy, which tries to
# build itself from source on 3.6 and above)
RUN apt-get -y install build-essential libpython3.6-dev libpython3.7-dev libpython3.9-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h

# Install pip and virtualenv
ADD https://bootstrap.pypa.io/get-pip.py /src/get-pip.py
WORKDIR /src
RUN python3.9 get-pip.py
RUN pip3.9 install virtualenv
8 changes: 6 additions & 2 deletions scripts/create_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ cd ${WORKSPACE}
TC_BUILD_IMAGE_CENTOS6=$(bash $WORKSPACE/scripts/get_docker_image.sh --centos=6)
TC_BUILD_IMAGE_1404=$(bash $WORKSPACE/scripts/get_docker_image.sh --ubuntu=14.04)
TC_BUILD_IMAGE_1804=$(bash $WORKSPACE/scripts/get_docker_image.sh --ubuntu=18.04)
TC_BUILD_IMAGE_2004=$(bash $WORKSPACE/scripts/get_docker_image.sh --ubuntu=20.04)
TC_BUILD_IMAGE_2204=$(bash $WORKSPACE/scripts/get_docker_image.sh --ubuntu=22.04)

print_help() {
echo "Creates Docker images for building and testing Turi Create."
Expand Down Expand Up @@ -42,21 +44,23 @@ if [[ -n $PERSIST_TO_REPO_DIR ]]; then
(test -f .docker_images/image-centos6.gz && docker load -i .docker_images/image-centos6.gz) || true
(test -f .docker_images/image-14.04.gz && docker load -i .docker_images/image-14.04.gz) || true
(test -f .docker_images/image-18.04.gz && docker load -i .docker_images/image-18.04.gz) || true
(test -f .docker_images/image-20.04.gz && docker load -i .docker_images/image-20.04.gz) || true
(test -f .docker_images/image-22.04.gz && docker load -i .docker_images/image-22.04.gz) || true
fi

# Load images from registry if possible
(docker pull -q ${TC_BUILD_IMAGE_CENTOS6}) || true
(docker pull -q ${TC_BUILD_IMAGE_1404}) || true
(docker pull ${TC_BUILD_IMAGE_1804}) || true


(docker image ls ${TC_BUILD_IMAGE_CENTOS6} | grep turicreate/build-image) || \
cat scripts/Dockerfile-CentOS-6 | docker build -t ${TC_BUILD_IMAGE_CENTOS6} -


(docker image ls ${TC_BUILD_IMAGE_1404} | grep turicreate/build-image) || \
cat scripts/Dockerfile-Ubuntu-14.04 | docker build -t ${TC_BUILD_IMAGE_1404} -

(docker image ls ${TC_BUILD_IMAGE_1804} | grep turicreate/build-image) || \
cat scripts/Dockerfile-Ubuntu-18.04 | docker build -t ${TC_BUILD_IMAGE_1804} -

# Save images back to repo directory so they can be re-used the next time this script is run.
# (This assumes the build may run on another machine, but with the same directory contents. This setup is
Expand Down
5 changes: 4 additions & 1 deletion scripts/make_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ print_help() {
echo
echo " --docker-python3.9 Use docker to build for Python 3.9 in CentOS 6 with Clang 8."
echo
echo " --docker-python3.10 Use docker to build for Python 3.10 in CentOS 6 with Clang 8."
echo
echo " --num_procs=n Specify the number of proceses to run in parallel."
echo
echo " --target-dir=[dir] The directory where the wheel and associated files are put."
Expand Down Expand Up @@ -76,6 +78,7 @@ while [ $# -gt 0 ]
--docker-python3.7) USE_DOCKER=1;DOCKER_PYTHON=3.7;;
--docker-python3.8) USE_DOCKER=1;DOCKER_PYTHON=3.8;;
--docker-python3.9) USE_DOCKER=1;DOCKER_PYTHON=3.9;;
--docker-python3.10) USE_DOCKER=1;DOCKER_PYTHON=3.10;;
--help) print_help ;;
*) unknown_option $1 ;;
esac
Expand Down Expand Up @@ -389,7 +392,7 @@ function package_wheel() {
}

# Run the setup
package_wheel_helper 0 ""
#package_wheel_helper 0 ""
package_wheel_helper 1 +minimal

echo -e "\n\n================= Done Packaging Wheel ================\n\n"
Expand Down
9 changes: 6 additions & 3 deletions scripts/requirements-minimal.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
numpy==1.16.4; python_version < '3.6'
numpy==1.19.1; python_version >= '3.6' and python_version < '3.9'
numpy==1.21.1; python_version == '3.9'
numpy==1.20; python_version == '3.9'
numpy==1.21; python_version >= '3.10'

cython==0.29.21
decorator==4.4.0

pandas==0.24.2; python_version <= '3.6'
pandas==1.0.5; python_version > '3.6' and python_version < '3.9'
pandas==1.3.1; python_version == '3.9'
pandas==2.0.2; python_version >= '3.10'

pillow==6.2.2; python_version < '3.9'
pillow==8.3.1; python_version == '3.9'
pillow==8.3.1; python_version >= '3.9'

prettytable==0.7.2
pytz==2019.1
pytz==2019.1 ; python_version <= '3.9'
pytz==2020.1 ; python_version >= '3.10'
future==0.17.1
pyOpenSSL==19.0.0
ndg-httpsclient==0.5.1
Expand Down