File size: 917 Bytes
c0417af
7468dfd
 
 
 
 
 
 
 
c0417af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7468dfd
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:latest

RUN mkdir -p /code
RUN chmod 777 /code

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

RUN apt-get update && apt-get upgrade -y
RUN apt-get install ffmpeg -y
RUN apt-get install git -y

RUN apt-get install -y \
    build-essential \
    libssl-dev \
    ca-certificates \
    libasound2 \
    wget

# Download OpenSSL source, compile, and install it
RUN wget -O - https://www.openssl.org/source/openssl-1.1.1u.tar.gz | tar zxf -
WORKDIR openssl-1.1.1u
RUN ./config --prefix=/usr/local
RUN make -j $(nproc)
RUN make install_sw install_ssldirs
RUN ldconfig -v

# Set environment variables
ENV SSL_CERT_DIR=/etc/ssl/certs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /code

RUN pip install --upgrade pip 

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
COPY ./app /code/app

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