alethanhson commited on
Commit
84f8f32
·
1 Parent(s): 69f1be1
Files changed (2) hide show
  1. Dockerfile +34 -8
  2. docker-compose.yml +1 -0
Dockerfile CHANGED
@@ -1,13 +1,39 @@
1
- FROM python:3.10
2
 
3
- RUN useradd -m -u 1000 user
4
- USER user
5
- ENV PATH="/home/user/.local/bin:$PATH"
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  WORKDIR /app
8
 
9
- COPY --chown=user ./requirements.txt requirements.txt
10
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- COPY --chown=user . /app
13
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # FROM python:3.10
2
 
3
+ # RUN useradd -m -u 1000 user
4
+ # USER user
5
+ # ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ # WORKDIR /app
8
+
9
+ # COPY --chown=user ./requirements.txt requirements.txt
10
+ # RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ # COPY --chown=user . /app
13
+ # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
14
+
15
+
16
+ FROM python:3.10-slim
17
 
18
  WORKDIR /app
19
 
20
+ RUN apt-get update && apt-get install -y \
21
+ git \
22
+ ffmpeg \
23
+ wget \
24
+ gnupg \
25
+ && rm -rf /var/lib/apt/lists/*
26
+
27
+ COPY requirements.txt .
28
+ RUN pip install --no-cache-dir -r requirements.txt
29
+
30
+ COPY . .
31
+
32
+ ENV PYTHONUNBUFFERED=1
33
+ ENV PYTHONIOENCODING=UTF-8
34
+
35
+ RUN mkdir -p /root/.cache/huggingface
36
+
37
+ EXPOSE 8000
38
 
39
+ ENTRYPOINT ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
docker-compose.yml CHANGED
@@ -1,3 +1,4 @@
 
1
  services:
2
  csm:
3
  build:
 
1
+ version: '3'
2
  services:
3
  csm:
4
  build: