-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
41 lines (33 loc) · 879 Bytes
/
Dockerfile
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
# This Dockerfile is for running the automation API in ./app
FROM python:3.11.4-buster
# set env
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV BAM_ENV=docker
# Install system requirements
RUN apt update
RUN apt install -y \
curl \
build-essential \
python3-pip \
uwsgi \
uwsgi-plugin-python3
# get pip striaght
RUN pip3.11 install --upgrade pip
# Configure system
RUN export PATH=~/.local/bin:$PATH
ENV PYTHONPATH "/opt/bam:$PYTHONPATH"
# Install API requirements
WORKDIR /opt/bam
# Install core.
ADD core /opt/bam-core
RUN pip3.11 install -e /opt/bam-core
# Install api requirements.
COPY app/requirements.txt /opt/bam/requirements.txt
RUN pip3.11 install -r /opt/bam/requirements.txt
# Install api.
ADD app /opt/bam
RUN pip3.11 install -e /opt/bam
# Start app
CMD ["uvicorn", "bam_app.main:app", "--port", "3030", "--host", "0.0.0.0"]