-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
50 lines (38 loc) · 1.42 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 python:3.11
ENV PYTHONUNBUFFERED 1
ENV LANG C.UTF-8
RUN mkdir -p /etc/apt/keyrings/
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
libmad0-dev \
libsndfile1-dev \
libgd-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-regex-dev \
nodejs \
libsndfile1-dev \
lame \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt
ADD requirements_dev.txt /code/
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements_dev.txt
RUN mkdir /sources
WORKDIR /sources
RUN git clone https://github.com/MTG/pycompmusic.git
WORKDIR /sources/pycompmusic
RUN pip install -e . -t /usr/local/lib/python3.11/dist-packages/
ADD package.json package-lock.json /code/
WORKDIR /code
RUN npm install && rm -r ~/.npm
ADD . /code/
RUN npm run build
# TODO: Could be made part of the frontend build script
RUN bash build-less.sh
RUN python manage.py collectstatic --settings dunya.build_settings