Skip to content

Commit

Permalink
add git to prod container
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Dec 1, 2024
1 parent df383d7 commit 36b94ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion application/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ apt-get -qq update && apt-get -qq install -y locales
echo "en_US.UTF-8 UTF-8" | tee -a /etc/locale.gen && locale-gen

# Tools
apt-get -qq install -y python3 python3-dev
apt-get -qq install -y python3 python3-dev git
# For MariaDB
apt-get -qq install -y mariadb-client
#
Expand Down
11 changes: 7 additions & 4 deletions application/src/tira_app/endpoints/v1/_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ class _DatasetView(ModelViewSet):
def load_mirrored_resource(md5_sum):
ret = None

obj = modeldb.MirroredResource.objects.filter(md5_sum=md5_sum).first()
ret = {"md5_sum": obj.md5_sum, "md5_first_kilobyte": obj.md5_first_kilobyte, "size": obj.size}
ret["mirrors"] = {}
ret["mirrors"] = json.loads(obj.mirrors)
try:
obj = modeldb.MirroredResource.objects.filter(md5_sum=md5_sum).first()
ret = {"md5_sum": obj.md5_sum, "md5_first_kilobyte": obj.md5_first_kilobyte, "size": obj.size}
ret["mirrors"] = {}
ret["mirrors"] = json.loads(obj.mirrors)
except:
pass

return ret

Expand Down

0 comments on commit 36b94ec

Please sign in to comment.