Skip to content

Commit

Permalink
Revert git commit ref versioning (NOT WORKING)
Browse files Browse the repository at this point in the history
  • Loading branch information
greenw0lf committed Oct 18, 2024
1 parent 0ecdaf8 commit a8286a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/tests
.venv
.flake8
.git
.github
.mypy_cache
.pytest_cache
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ RUN pipx run poetry export --format requirements.txt --output requirements.txt

FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04

# Install Python & ffmpeg & Git
# Install Python & ffmpeg
RUN apt-get update && \
apt-get install -y python3.11-dev python3-pip python-is-python3 ffmpeg git && \
apt-get install -y python3.11-dev python3-pip python-is-python3 ffmpeg && \
rm -rf /var/lib/apt/lists/*

# Ensure Python 3.11 is used (for some reason, 3.10 is also installed...)
Expand All @@ -35,8 +35,8 @@ RUN python -m pip install --no-cache-dir -r requirements.txt
# copy the rest into the source dir
COPY ./ /src

# Get git commit info, then delete the .git folder
RUN git rev-parse HEAD >> git_commit
RUN rm -rf .git
# # Get git commit info, then delete the .git folder
# RUN git rev-parse HEAD >> git_commit
# RUN rm -rf .git

ENTRYPOINT ["./docker-entrypoint.sh"]
11 changes: 6 additions & 5 deletions asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@

logger = logging.getLogger(__name__)

# Get commit hash and use it as version in prov
# TODO: Get commit hash and use it as version in prov
# (prev impl didn't work)
version = ""
if os.path.exists("git_commit"):
with open("git_commit", "r") as f:
for line in f:
version = line.strip()
# if os.path.exists("git_commit"):
# with open("git_commit", "r") as f:
# for line in f:
# version = line.strip()


def run(input_uri: str, output_uri: str, model=None) -> Optional[str]:
Expand Down

0 comments on commit a8286a9

Please sign in to comment.