quran-nlp / Dockerfile
deveix
fix update
e0568c1
raw
history blame
1.21 kB
# Choose our version of Python
FROM python:3.9-slim
# Set up a working directory
# WORKDIR /code
# Copy just the requirements into the working directory so it gets cached by itself
COPY ./requirements.txt /code/requirements.txt
RUN apt-get update && apt-get install -y ffmpeg
# Install the dependencies from the requirements file
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# RUN pip install pydantic==1.10.8
# RUN pip install typing-inspect==0.8.0 typing_extensions==4.5.
# RUN pip install --force-reinstall typing-extensions==4.5
# RUN pip install --force-reinstall openai==1.8
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/code
COPY --chown=user ./app $HOME/code/app
# Copy the code into the working directory
# COPY ./app /code/app
ENV PORT=8000
EXPOSE 8000
# execute the command python main.py (in the WORKDIR) to start the app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
# Tell uvicorn to start spin up our code, which will be running inside the container now
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
# uvicorn app.main:app --host 0.0.0.0 --port 80