-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (16 loc) · 703 Bytes
/
Dockerfile
File metadata and controls
23 lines (16 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Start from official miniconda image
FROM continuumio/miniconda3
# This will be our base folder in image where we'll put src and environment.yml
WORKDIR /code
# Copy environment.yml
COPY ./environment.yml /code/environment.yml
# Install all dependencies
RUN conda env create -f environment.yml
# Activate conda environment/Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "code_template", "/bin/bash", "-c"]
# Copy source code and config
COPY ./src /code/src
COPY ./config /code/config
COPY ./main.py /code/
# Entrypoint for main script
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "code_template", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]