-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (52 loc) · 2.19 KB
/
Dockerfile
File metadata and controls
72 lines (52 loc) · 2.19 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Use Ubuntu as the base image
FROM ubuntu:20.04
# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
# Set the working directory in the container
WORKDIR /usr/src/app
# Install dependencies and tools: Node.js, Python, pip, curl, OpenJDK
RUN apt-get update && apt-get install -y \
git \
nano \
curl \
python3.9 \
python3-pip \
r-base \
unzip \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
&& rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2 && \
update-alternatives --set python3 /usr/bin/python3.9
RUN pip3 install numpy pandas openpyxl psycopg2-binary pysheetreader jupyter python-calamine duckdb pyarrow fastparquet
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# Install DuckDB CLI (latest static binary)
RUN curl -L -o duckdb https://github.com/duckdb/duckdb/releases/download/v0.10.1/duckdb_cli-linux-amd64.zip && \
unzip duckdb -d /usr/local/bin/ && \
chmod +x /usr/local/bin/duckdb
# Add and run script to generate lineitem CSV and Parquet
COPY generate_lineitem.sh /usr/src/app/generate_lineitem.sh
RUN chmod +x /usr/src/app/generate_lineitem.sh && \
/usr/src/app/generate_lineitem.sh
# Add NVM to PATH. Replace /root/.nvm with your actual NVM directory if different.
ENV NVM_DIR=/root/.nvm
ENV NODE_VERSION 14.17.0
# Install Node.js and npm
RUN . "$NVM_DIR/nvm.sh" && nvm install $NODE_VERSION && nvm use $NODE_VERSION && nvm alias default $NODE_VERSION
# Add node and npm to path so the commands are available
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Copy the current directory contents into the container at /usr/src/app
COPY . .
# Install React app dependencies
# Assuming you have a package.json file in your React app
RUN cd /usr/src/app/gui && npm install
# Make port 3000 available to the world outside this container for React
# Make port 8888 available for Jupyter
EXPOSE 3000
EXPOSE 8888
# Define environment variable
ENV NAME World
# Run Jupyter notebook when the container launches
ENTRYPOINT ["/usr/src/app/start_servers.sh"]