File size: 569 Bytes
304be48
 
d3098f2
304be48
f08373d
614ce7a
f08373d
 
 
 
 
01ed7b9
69ce0b1
f08373d
 
afee0d3
 
 
74f67ce
afee0d3
 
 
74f67ce
f08373d
304be48
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.9

WORKDIR /content

RUN mkdir /content/cache/

RUN export TRANSFORMERS_CACHE=/content/cache/

COPY ./requirements.txt /content/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /content/requirements.txt
RUN apt-get update && apt-get install -y ffmpeg

COPY . .

RUN adduser --disabled-password --gecos '' admin
RUN adduser admin sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN chown -R admin:admin /content
RUN chmod -R 777 /content
USER admin

EXPOSE 7860

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]