You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
654 B
23 lines
654 B
FROM continuumio/miniconda3
|
|
|
|
WORKDIR /app
|
|
|
|
# Create the environment:
|
|
COPY environment.yml .
|
|
RUN conda env create --file environment.yml
|
|
|
|
# Make RUN commands use the new environment:
|
|
RUN echo "conda activate myenv" >> ~/.bashrc
|
|
SHELL ["/bin/bash", "--login", "-c"]
|
|
|
|
# Demonstrate the environment is activated:
|
|
RUN echo "Make sure fastapi is installed:"
|
|
RUN python -c "import fastapi"
|
|
|
|
# The code to run when container is started:
|
|
COPY . /app
|
|
|
|
EXPOSE 80
|
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
|
|
CMD ["gunicorn", "app.main:app", "-w", "4", "-b", "0.0.0.0:80", "-k", "uvicorn.workers.UvicornWorker", "--timeout", "0", "--graceful-timeout", "0", "--keep-alive", "300"] |