Skip to content

Commit

Permalink
Remove githash.txt use and dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudotensor committed Aug 10, 2024
1 parent 4a8bda6 commit 282aec9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 15 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ COPY . /workspace/

COPY build_info.txt /workspace/

COPY git_hash.txt /workspace/

RUN cd /workspace && ./docker_build_script_ubuntu.sh

RUN chmod -R a+rwx /workspace
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ build_info.txt:
@echo "build_user=\"`id -u -n`\"" >> $@
@echo "base_version=\"$(PACKAGE_VERSION)\"" >> $@

git_hash.txt:
@echo "$(shell git rev-parse HEAD)" >> $@


docker_build: build_info.txt git_hash.txt
docker_build: build_info.txt
ifeq ($(shell curl --connect-timeout 4 --write-out %{http_code} -sS --output /dev/null -X GET https://gcr.io/v2/vorvan/h2oai/h2oai-h2ogpt-runtime/manifests/$(BUILD_TAG)),200)
@echo "Image already pushed to GCR: $(DOCKER_H2OGPT_RUNTIME_IMAGE)"
docker pull $(DOCKER_H2OGPT_RUNTIME_IMAGE)
Expand Down
1 change: 0 additions & 1 deletion docker_build_script_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ pip install https://h2o-release.s3.amazonaws.com/h2ogpt/open_webui-0.3.8-py3-non

# Track build info
cp /workspace/build_info.txt /build_info.txt
cp /workspace/git_hash.txt /git_hash.txt

mkdir -p /workspace/save
chmod -R a+rwx /workspace/save
Expand Down
7 changes: 0 additions & 7 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,6 @@ def get_githash():
githash = git_hash_unset
except Exception as e:
print("git failed to run: %s" % str(e))
if githash == git_hash_unset:
try:
with open('git_hash.txt', 'rt') as f:
githash = f.read().strip()
except Exception as e:
print("git_hash.txt failed to be found: %s" % str(e))

if githash == git_hash_unset:
try:
from version import __version__
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3618868401689179d98c95be3ecdcc64d44d2acd"
__version__ = "4a8bda6fe1edf8ed37f619b250f66b11bd1b49c7"

0 comments on commit 282aec9

Please sign in to comment.