Fed Ang commited on
Commit
c74de41
1 Parent(s): 85712e9

first version

Browse files
Files changed (2) hide show
  1. Dockerfile +31 -0
  2. config.sh +2 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ ARG GIT_PAT
4
+
5
+ WORKDIR /code
6
+
7
+ RUN apt-get update && \
8
+ apt-get install -y --no-install-recommends git curl gpg build-essential ffmpeg && \
9
+ apt-get clean && \
10
+ rm -rf /var/lib/apt/lists/*
11
+
12
+ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
13
+ apt-get update && \
14
+ apt-get install -y git-lfs && \
15
+ rm -rf /var/lib/apt/lists/* && \
16
+ git lfs install
17
+
18
+ RUN --mount=type=secret,id=GIT_PAT,mode=0444,required=true \
19
+ HF_PAT=$(cat /run/secrets/GIT_PAT) && \
20
+ git config --global url."https://feddybear:${HF_PAT}@huggingface.co/spaces/".insteadOf "git://huggingface.co/spaces/" && \
21
+ git config --global credential.helper 'store --file ~/.git-credentials' && \
22
+ echo "https://feddybear:${HF_PAT}@huggingface.co/spaces/" > ~/.git-credentials
23
+
24
+ COPY . .
25
+
26
+ RUN chmod +x config.sh && ./config.sh && tar -zxf config.tgz && rm -f config.tgz ~/.git-credentials
27
+
28
+ RUN pip install -U pip && \
29
+ pip install --no-cache-dir --upgrade -r /code/requirements.txt
30
+
31
+ CMD ["streamlit", "run", "flipscribe.py", "--server.address", "0.0.0.0", "--server.port", "7860"]
config.sh ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ git lfs clone https://huggingface.co/spaces/flipvox/flipscribe-config
2
+ mv flipscribe-config/config.tgz .