Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile updates #105

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
38 changes: 11 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
FROM python:3.8.6-slim-buster as deps
# Set work directory
WORKDIR /home/speedtest
FROM python:3.11-buster as builder

# Copy files
COPY Pipfile .
COPY Pipfile.lock .
RUN pip install poetry==1.8.3

# Install pipenv
RUN pip install pipenv
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache

FROM deps as installer
# Set work directory
WORKDIR /home/speedtest
WORKDIR /frameio

# Install deps
RUN pipenv install --system --deploy --ignore-pipfile

# Copy over the other pieces
COPY README.md README.md
COPY pyproject.toml poetry.lock ./
COPY frameioclient frameioclient
COPY setup.py .
COPY README.md .

# Install the local frameioclient
RUN pipenv install -e . --skip-lock

# Copy over scripts and tests
COPY scripts scripts
COPY tests tests

ENV SEGMENT_WRITE_KEY=
RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --without dev

FROM installer as runtime
ENTRYPOINT [ "pipenv", "run", "python", "scripts/benchmark/download.py" ]
ENTRYPOINT [ "poetry", "run", "fiocli" ]
3 changes: 3 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[virtualenvs]
create = true
in-project = true
65 changes: 65 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
[tool.poetry]
name = "frameioclient"
version = "2.0.1a5"
description='Client library for the Frame.io API'
readme = "README.md"
license='MIT'
homepage = "https://github.com/Frameio/python-frameio-client"
authors = ["Frame.io DevRel <[email protected]>"]

classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Multimedia :: Video',
'Topic :: Software Development :: Libraries',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]

[tool.poetry.dependencies]
python = "^3.6"
analytics-python = "^1.4.0"
enlighten = "^1.10.2"
importlib-metadata = "^4.11.3"
requests = "^2.27.1"
token-bucket = "^0.3.0"
urllib3 = "^1.26.9"
xxhash = "^3.0.0"
furl = "^2.1.3"
tqdm = "^4.66.2"

[tool.poetry.dev-dependencies]
bump2version = "^1.0.1"

# Optional dependencies
Sphinx = { version = "^4.4.0", optional = true }
sphinx-jekyll-builder = { version = "^0.3.0", optional = true }
sphinxcontrib-restbuilder = { version = "^0.3", optional = true }
sphinx-autobuild = { version = "^2021.3.14", optional = true }
contentful_management = { version = "^2.11.0", optional = true }
python-frontmatter = { version = "^1.0.0", optional = true }
sphinx-autodoc-typehints = { version = "^1.17.0", optional = true }
furo = { version = "^2022.3.4", optional = true }
python-dotenv = "^0.19.2"

[tool.poetry.extras]
docs = [
"sphinx",
"sphinx-jekyll-builder",
"sphinxcontrib-restbuilder",
"sphinx-autobuild",
"contentful_management",
"python-frontmatter",
"sphinx-autodoc-typehints",
"furo"
]

[tool.poetry.scripts]
fiocli = 'frameioclient.fiocli:main'

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta:__legacy__"