forked from lakevision-project/lakevision
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (40 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
49 lines (40 loc) · 1.41 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
FROM node:20.17.0-bookworm AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends nginx python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED && python3 -m pip install --upgrade pip
FROM builder AS be
ENV PYTHONUNBUFFERED=1
RUN mkdir -p /app
WORKDIR /app/be
COPY ./be/requirements.txt ./
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY ./be/app ./app
COPY start.sh /app/start.sh
RUN chmod 755 /app/start.sh
COPY worker.sh /app/worker.sh
RUN chmod 755 /app/worker.sh
#USER lv
FROM be
WORKDIR /app/fe
COPY ./fe/package*.json ./
RUN npm ci
COPY ./fe/ .
COPY nginx.conf /etc/nginx/
ARG ENABLE_SAMPLE_CATALOG=false
# Copy sample loader and helpers into the container
COPY scripts/load_sample_data.py /app/scripts/load_sample_data.py
COPY scripts/create_test_iceberg_tables.py /app/scripts/create_test_iceberg_tables.py
RUN if [ "$ENABLE_SAMPLE_CATALOG" = "true" ]; then \
echo "🧪 Loading sample catalog for quickstart..." && \
cd /app/be && \
export PYICEBERG_CATALOG__DEFAULT__URI=sqlite:////app/warehouse/sql-catalog.db && \
export PYICEBERG_CATALOG__DEFAULT__WAREHOUSE=file:///app/warehouse \
export PYTHONPATH=app && \
env && \
python3 /app/scripts/load_sample_data.py; \
fi
#fix later, this is for OCP
RUN chmod -R 777 /app/ && chmod -R 777 /var/lib/nginx/
EXPOSE 3000 8000 8081
ENV HOST=0.0.0.0