-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
50 lines (44 loc) · 1.4 KB
/
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
42
43
44
45
46
47
48
49
50
###########################################
FROM jrottenberg/ffmpeg:4.1-ubuntu AS base
###########################################
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
POETRY_NO_INTERACTION=1
RUN apt-get update && \
apt-get install -y python3.8 pip git && \
apt-get install --no-install-recommends -y curl build-essential && \
apt-get clean
##################
FROM base AS apg
##################
WORKDIR /
RUN mkdir /apg && \
git clone https://github.com/jeffwright13/audio_program_generator.git
###################
FROM apg AS poetry
###################
ARG APG_SRC_DIR=/audio_program_generator
WORKDIR $APG_SRC_DIR
RUN pip install --no-cache-dir poetry
######################
FROM poetry AS apg-run
######################
ARG APG_SRC_DIR=/audio_program_generator
WORKDIR $APG_SRC_DIR
COPY pyproject.toml ./
COPY poetry.lock ./
RUN poetry install --no-interaction --no-dev
ENTRYPOINT ["/bin/bash", "-c", "poetry run apg \"$@\"", "--"]
#######################
FROM poetry AS apg-test
#######################
ARG APG_SRC_DIR=/audio_program_generator
COPY ./entry-test.sh ./entry-test.sh
RUN cd $APG_SRC_DIR && \
poetry install --no-interaction
RUN ln -s $(poetry env info --path) /var/my-venv
RUN echo 'source /var/my-venv/bin/activate' >> ~/.bashrc
ENTRYPOINT ["/bin/bash"]
CMD ["/audio_program_generator/entry-test.sh"]