Opera8 commited on
Commit
4e39378
·
verified ·
1 Parent(s): 92e2b51

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+ FROM python:3.9-slim
3
+
4
+ RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
5
+ RUN useradd -m -u 1000 user
6
+ WORKDIR /app
7
+ RUN chown user:user /app
8
+ RUN mkdir -p /tmp/huggingface_cache_ezmary && chown user:user /tmp/huggingface_cache_ezmary
9
+ USER user
10
+ ENV PATH="/home/user/.local/bin:$PATH"
11
+
12
+ RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
13
+ git clone https://oauth2:$(cat /run/secrets/GITHUB_TOKEN)@github.com/Hamed744/Podcast.git .
14
+
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+ EXPOSE 7860
17
+ ENV PORT=7860
18
+ ENV PYTHONUNBUFFERED=1
19
+ CMD ["gunicorn", "--workers", "1", "--threads", "8", "--worker-class", "gthread", "--bind", "0.0.0.0:7860", "--timeout", "1200", "app:app"]