Spaces:
Sleeping
Sleeping
| 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"] |