Skip to content

Commit 1ee2e24

Browse files
committed
Merge branch 'v1.4.1' of https://github.com/robertmartin8/PyPortfolioOpt into v1.4.1
2 parents cc48e5f + 59ad7fa commit 1ee2e24

File tree

8 files changed

+49
-95
lines changed

8 files changed

+49
-95
lines changed

.dockerignore

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
#https://stackoverflow.com/questions/28097064/dockerignore-ignore-everything-except-a-file-and-the-dockerfile
1+
# Environments
2+
.env
3+
.venv
4+
env/
5+
venv/
6+
ENV/
7+
env.bak/
8+
venv.bak/
29

3-
# Ignore Everything
4-
**
5-
6-
!pypfopt
7-
!tests
8-
!setup.py
9-
!README.md
10-
!requirements.txt
11-
!binder
12-
!cookbook
13-
14-
**/__pycache__
15-
**/*.pyc
10+
*/__pycache__
11+
*/*.pyc

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ DEV/
1111
.pytest_cache/
1212
.vscode/
1313

14+
# Environments
15+
.env
16+
.venv
17+
env/
18+
venv/
19+
ENV/
20+
env.bak/
21+
venv.bak/
22+
1423
pip-selfcheck.json
1524

1625
.coverage

Dockerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

binder/Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

binder/jupyter_notebook_config.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

docker-compose.test.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

docker-compose.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

docker/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM python:3.8-slim-buster
2+
3+
WORKDIR pypfopt
4+
COPY pyproject.toml poetry.lock ./
5+
6+
RUN buildDeps='gcc g++' && \
7+
apt-get update && apt-get install -y $buildDeps --no-install-recommends && \
8+
pip install --upgrade pip==21.0.1 && \
9+
pip install "poetry==1.1.4" && \
10+
poetry install -E optionals --no-root && \
11+
apt-get purge -y --auto-remove $buildDeps
12+
13+
COPY . .
14+
15+
# Usage examples:
16+
#
17+
# Build
18+
# from root of repo:
19+
# docker build -f docker/Dockerfile . -t pypfopt
20+
#
21+
# Run
22+
# iPython interpreter:
23+
# docker run -it pypfopt poetry run ipython
24+
# Jupyter notebook server:
25+
# docker run -it -p 8888:8888 pypfopt poetry run jupyter notebook --allow-root --no-browser --ip 0.0.0.0
26+
# click on http://127.0.0.1:8888/?token=xxx
27+
# Pytest
28+
# docker run -t pypfopt poetry run pytest
29+
# Bash
30+
# docker run -it pypfopt bash

0 commit comments

Comments
 (0)