inoki-giskard commited on
Commit
e9f1199
·
1 Parent(s): 42c94b8

Use license from HF secret if exists

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -3
  2. hf.sh +7 -0
Dockerfile CHANGED
@@ -44,9 +44,6 @@ RUN pip install --upgrade pip && \
44
  # Install giskard library built by the original Dockerfile
45
  RUN WHEEL=$(ls $GSK_DIST_PATH/python-client/giskard*.whl) && pip install $WHEEL\[server\]
46
 
47
- # Don't ask for a license when running on HuggingFace, include a pre-generated free one
48
- COPY --chown=giskard license-huggingface.lic /home/giskard/datadir/license.lic
49
-
50
  # Only changed the original supervisord.conf to redirect logs to stdout
51
  COPY --chown=giskard supervisord.conf $GSK_DIST_PATH
52
 
 
44
  # Install giskard library built by the original Dockerfile
45
  RUN WHEEL=$(ls $GSK_DIST_PATH/python-client/giskard*.whl) && pip install $WHEEL\[server\]
46
 
 
 
 
47
  # Only changed the original supervisord.conf to redirect logs to stdout
48
  COPY --chown=giskard supervisord.conf $GSK_DIST_PATH
49
 
hf.sh CHANGED
@@ -15,4 +15,11 @@ then
15
  rm "${PGDATA}/postmaster.pid"
16
  fi
17
 
 
 
 
 
 
 
 
18
  supervisord -c /opt/giskard/supervisord.conf
 
15
  rm "${PGDATA}/postmaster.pid"
16
  fi
17
 
18
+ if [ ! -z "${GSK_LICENSE}" ]
19
+ then
20
+ # Use new license if env set
21
+ echo "${GSK_LICENSE}" > "${GSK_HOME}/license.lic"
22
+ # TODO: Backend raises exception if license is not parsable
23
+ fi
24
+
25
  supervisord -c /opt/giskard/supervisord.conf