-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Dockerfile
56 lines (40 loc) · 1.24 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
# Start from this image
FROM python:3.11.4-slim
# Set the working directory in the container
WORKDIR /workspace
# COPY . /workspace
# Install Git, gcc, g++, cmake
RUN apt-get update && \
apt-get install -y \
git \
gcc \
g++ \
cmake \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Clone the GitHub repository
RUN git clone https://github.com/cantaro86/Financial-Models-Numerical-Methods.git .
# Install requirments
RUN pip install --upgrade pip
RUN pip install --no-cache-dir --requirement requirements.txt
# Old style jupyter notebooks
RUN pip install nbclassic
# Install local package
RUN pip install .
# Expose the Jupyter Notebook port
EXPOSE 8888
# Start Jupyter Notebook server
CMD ["jupyter", "nbclassic", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token=''"]
#################################################################
# 1. BUILD
# docker build -t fmnm .
# 2. CREATE CONTAINER
# docker run --rm -d -p 8888:8888 --name Numeric_Finance fmnm
# 3. OPEN IN BROWSER
# http://localhost:8888/lab
# or
# http://localhost:8888/lab
# OR
# 1. docker-compose up --build -d --remove-orphans
# 2. docker-compose down --rmi all --volumes --remove-orphans