tonigi commited on
Commit
4319543
·
1 Parent(s): f78c65e

re-deploying on HF: ce70c26e9ba61f17a06ba774ee3047f2208da874

Browse files
Files changed (3) hide show
  1. Dockerfile +5 -2
  2. commitid.txt +0 -1
  3. deploy.sh +6 -3
Dockerfile CHANGED
@@ -9,7 +9,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
9
  STREAMLIT_SERVER_ADDRESS=0.0.0.0
10
 
11
  ARG APP_REPO=https://github.com/giorginolab/pkaScope.git
12
- ARG APP_REF=main
13
 
14
  RUN apt-get update \
15
  && apt-get install --yes --no-install-recommends git \
@@ -18,7 +18,10 @@ RUN apt-get update \
18
  RUN python -m pip install --no-cache-dir uv
19
 
20
  WORKDIR /opt
21
- RUN git clone --depth 1 --branch "${APP_REF}" --recurse-submodules "${APP_REPO}" app
 
 
 
22
 
23
  WORKDIR /opt/app
24
  RUN uv sync --frozen --no-dev
 
9
  STREAMLIT_SERVER_ADDRESS=0.0.0.0
10
 
11
  ARG APP_REPO=https://github.com/giorginolab/pkaScope.git
12
+ ARG APP_COMMIT=ce70c26e9ba61f17a06ba774ee3047f2208da874
13
 
14
  RUN apt-get update \
15
  && apt-get install --yes --no-install-recommends git \
 
18
  RUN python -m pip install --no-cache-dir uv
19
 
20
  WORKDIR /opt
21
+ RUN git clone "${APP_REPO}" app \
22
+ && cd app \
23
+ && git checkout "${APP_COMMIT}" \
24
+ && git submodule update --init --recursive
25
 
26
  WORKDIR /opt/app
27
  RUN uv sync --frozen --no-dev
commitid.txt DELETED
@@ -1 +0,0 @@
1
- Updating to aa6a5b1c2ca3c8443d50c09fe0fd113a2b746d80
 
 
deploy.sh CHANGED
@@ -1,6 +1,9 @@
1
  # Commit of parent dir
2
  commitid=$(git -C .. rev-parse HEAD)
3
- echo "Updating to $commitid" > commitid.txt
4
- git add commitid.txt
5
- git commit -m "re-deploying on HF"
 
 
 
6
  git push
 
1
  # Commit of parent dir
2
  commitid=$(git -C .. rev-parse HEAD)
3
+
4
+ # Keep HF Docker build pinned to the exact app commit.
5
+ sed -i.bak "s/^ARG APP_COMMIT=.*/ARG APP_COMMIT=${commitid}/" Dockerfile && rm Dockerfile.bak
6
+
7
+ git add Dockerfile
8
+ git commit -m "re-deploying on HF: ${commitid}"
9
  git push