-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (52 loc) · 1.2 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
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
git \
curl \
wget \
ca-certificates \
sudo \
bzip2 \
libx11-6 \
iputils-ping net-tools
RUN apt install -y build-essential \
libssl-dev \
libffi-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
llvm \
libncurses5-dev \
xz-utils \
tk-dev \
libxml2-dev \
libxmlsec1-dev \
liblzma-dev \
gcc \
python3-dev \
ffmpeg \
portaudio19-dev \
pulseaudio
# Install pyenv
RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv
ENV PYENV_ROOT="/root/.pyenv"
ENV PATH="/root/.pyenv/bin:$PATH"
RUN eval "$(pyenv init --path)"
RUN pyenv install 3.10.9 && pyenv global 3.10.9
RUN python3 --version
WORKDIR /app
# COPY
COPY ./ /app/
# Python environment settings
ENV POETRY_HOME="/root/.local"
ENV PATH="$POETRY_HOME/bin:$PATH"
RUN curl -sSL https://install.python-poetry.org | python3 -
# Setup the virtual environment
RUN poetry config virtualenvs.in-project true
RUN poetry env use 3.10.9
RUN poetry install
# Start shell
CMD ["/bin/bash"]