Spaces:
Build error
Build error
cptsubtext
commited on
Commit
·
faa06f2
1
Parent(s):
13dafa3
update dockerfile
Browse files- Dockerfile +35 -0
Dockerfile
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# app/Dockerfile
|
2 |
+
|
3 |
+
FROM python:3.10.15-slim
|
4 |
+
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
build-essential \
|
9 |
+
curl \
|
10 |
+
software-properties-common \
|
11 |
+
git \
|
12 |
+
ffmpeg \
|
13 |
+
&& rm -rf /var/lib/apt/lists/*
|
14 |
+
|
15 |
+
RUN git clone https://huggingface.co/spaces/cpt-subtext/speech-to-text .
|
16 |
+
|
17 |
+
RUN pip3 install -r requirements.txt
|
18 |
+
|
19 |
+
# User
|
20 |
+
RUN useradd -m -u 1000 user
|
21 |
+
USER user
|
22 |
+
ENV HOME /home/user
|
23 |
+
ENV PATH $HOME/.local/bin:$PATH
|
24 |
+
|
25 |
+
WORKDIR $HOME
|
26 |
+
RUN mkdir app
|
27 |
+
WORKDIR $HOME/app
|
28 |
+
COPY . $HOME/app
|
29 |
+
|
30 |
+
EXPOSE 8501
|
31 |
+
|
32 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
33 |
+
|
34 |
+
ENTRYPOINT ["streamlit", "run", "app.py", "--server.headless true","--server.enableCORS false","--server.enableXsrfProtection false","--server.fileWatcherType none"]
|
35 |
+
|