Add Dockerfile for creating sdists
This commit is contained in:
parent
a5d47c8dbd
commit
c1c04ec4ef
2 changed files with 46 additions and 1 deletions
42
Dockerfile.dist
Normal file
42
Dockerfile.dist
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Copyright 2022 Mycroft AI Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# -----------------------------------------------------------------------------
|
||||
# Dockerfile for Mimic 3 (https://github.com/MycroftAI/mimic3)
|
||||
#
|
||||
# Runs code checks and creates source code distributions for PyPI.
|
||||
#
|
||||
# Requires Docker buildx: https://docs.docker.com/buildx/working-with-buildx/
|
||||
# -----------------------------------------------------------------------------
|
||||
FROM python:3.9
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
WORKDIR /build/mimic3
|
||||
COPY ./ ./
|
||||
|
||||
# Install mimic3 and development dependencies
|
||||
RUN --mount=type=cache,id=pip-venv,target=/root/.cache/pip \
|
||||
./install.sh develop
|
||||
|
||||
# Check code
|
||||
RUN ./check.sh
|
||||
|
||||
# Create sdists
|
||||
RUN ./build-dist.sh
|
||||
|
|
@ -19,6 +19,9 @@
|
|||
# Creates a virtual environment and installs local Python modules in editable
|
||||
# mode (-e).
|
||||
#
|
||||
# Development dependencies (linters, etc.) will be installed if 'develop' is
|
||||
# given as an argument.
|
||||
#
|
||||
set -eo pipefail
|
||||
|
||||
# Directory of *this* script
|
||||
|
|
@ -56,7 +59,7 @@ popd 2>/dev/null
|
|||
|
||||
pip3 ${PIP_INSTALL} -e "${this_dir}/mimic3-http"
|
||||
|
||||
if [ -f "${this_dir}/requirements_dev.txt" ]; then
|
||||
if [ "$1" = 'develop' ]; then
|
||||
pip3 ${PIP_INSTALL} -r "${this_dir}/requirements_dev.txt"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue