-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from meteofrance/testpypi
Working testpypi publishing
- Loading branch information
Showing
5 changed files
with
62 additions
and
7 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 |
---|---|---|
|
@@ -166,4 +166,4 @@ logs/ | |
|
||
# Meteo France certificates | ||
matplotlibrc | ||
mf.crt | ||
mf.crt |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
FROM pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime | ||
|
||
RUN apt -y update && apt -y install git | ||
WORKDIR /app | ||
COPY requirements.txt requirements.txt | ||
COPY requirements_dev.txt requirements_dev.txt | ||
RUN pip install --upgrade pip && pip install -r requirements.txt && pip install -r requirements_dev.txt | ||
|
||
RUN pip install --upgrade build twine | ||
ADD mfai /app/mfai | ||
ADD tests /app/tests | ||
|
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,18 @@ | ||
# Script to build and publish mfai using runai (MF internal docker wrapper) | ||
|
||
# Check if the repo is on a tag and if there is local modifications | ||
set -e | ||
git_tag=$(git describe --tags --abbrev=0 --exact-match) | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Error: You are on a git tag but there are local modifications. Please stash them or commit, push and tag your modifications." | ||
exit 1 | ||
fi | ||
|
||
# Fetch the latest tags from the remote and throw an error if the tag does not exist | ||
git fetch --tags && git ls-remote --tags origin | grep -q "refs/tags/$git_tag" || { echo "Error: Tag '$git_tag' does not exist on the remote."; exit 1; } | ||
|
||
rm -rf dist/mfai*.whl | ||
rm -rf dist/mfai*.tar.gz | ||
runai exec python -m build | ||
# Use first arg if provided, otherwise use testpypi | ||
runai exec python -m twine upload --verbose --repository ${1:-"testpypi"} 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "mfai" | ||
version = "1.0.0" | ||
authors = [ | ||
{name="Frank Guibert", email="[email protected]"}, | ||
{name="Theo Tournier", email="[email protected]"}, | ||
|
@@ -16,15 +15,17 @@ readme = "README.md" | |
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: Apache 2", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
] | ||
dynamic = ["dependencies"] | ||
dynamic = ["dependencies", "version"] | ||
license = {file = "LICENSE"} | ||
keywords = ["PyTorch", "Deep Learning", "Artificial Intelligence", "Meteo-France"] | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = {file = ["requirements.txt"]} | ||
|
||
[tool.setuptools_scm] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/meteofrance/mfai" |