-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (43 loc) · 1.35 KB
/
Dockerfile
File metadata and controls
56 lines (43 loc) · 1.35 KB
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
FROM python:3.11.0
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
wget \
gnupg \
git \
cmake \
vim \
pkg-config \
python3-dev \
libjpeg-dev \
libpng-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . .
# Download and install uv
ADD https://astral.sh/uv/install.sh /uv-installer.sh
RUN sh /uv-installer.sh && rm /uv-installer.sh
# Ensure the installed binary is on the `PATH`
ENV PATH="/root/.local/bin:$PATH"
# Create venv and install deps
RUN uv sync --frozen
ENV PATH="/app/.venv/bin:$PATH"
RUN echo $PATH
RUN echo $(which python)
RUN echo $(which streamlit)
#######----- the locale files are compiled locally, they are mounted/baked into the image-----#####
# Download Python source for i18n
# RUN wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz \
# && tar xzf Python-3.11.0.tgz \
# && mv Python-3.11.0 /usr/local/src/ \
# && rm Python-3.11.0.tgz
# RUN /usr/local/src/Python-3.11.0/Tools/i18n/msgfmt.py \
# && /usr/local/src/Python-3.11.0/Tools/i18n/msgfmt.py \
# /app/locale/de/LC_MESSAGES/base.po \
# /app/locale/de/LC_MESSAGES/base
# Dev-in-container git config
RUN git config --global --add safe.directory /app
# Expose the port that Streamlit will run on
EXPOSE 8501