Skip to content

Commit ab5f979

Browse files
committed
Fixed error due to package requirement issue
one of the packages required by cadquery was improperly configured and causes issues with the cadquery import. Had to change docker base image and modify to include a configured environment to work around the issue. May require rebuilding or removing and recreating your docker image and containers. If you continue to encounter an import error please contact me.
1 parent ef31d4c commit ab5f979

File tree

2 files changed

+42
-9
lines changed

2 files changed

+42
-9
lines changed

docker/Dockerfile

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
FROM mambaorg/micromamba:0.8.2
1+
FROM continuumio/miniconda3
22

33
RUN apt-get update && \
44
apt-get install -y libgl1-mesa-glx gcc bash && \
55
rm -rf /var/lib/apt/lists/*
66

7-
WORKDIR /app
8-
RUN micromamba install -y -n base -c conda-forge -c cadquery \
9-
python=3 \
10-
cadquery=master \
11-
numpy=1 \
12-
scipy=1 && \
13-
(rm /opt/conda/pkgs/cache/* || true)
7+
8+
COPY ./docker/environment.yml .
9+
10+
RUN conda env create -f environment.yml
11+
12+
RUN conda init bash
13+
14+
SHELL ["bash", "-lc"]
15+
16+
RUN conda activate myenv
1417

1518
RUN pip3 install solidpython
1619

20+
RUN echo "source activate myenv" >> ~/.bashrc
21+
ENV PATH /opt/conda/envs/myenv/bin:$PATH
1722

18-
WORKDIR /app/src
23+
WORKDIR /app/src

docker/environment.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: myenv
2+
channels:
3+
- cadquery
4+
- conda-forge
5+
- defaults
6+
dependencies:
7+
- python>=3.6
8+
- ipython
9+
- ocp=7.5.1
10+
- pyparsing
11+
- sphinx=3.2.1
12+
- sphinx_rtd_theme
13+
- sphinx-autodoc-typehints
14+
- black=19.10b0
15+
- mypy
16+
- codecov
17+
- pytest
18+
- pytest-cov
19+
- ezdxf
20+
- ipython
21+
- typing_extensions
22+
- nptyping
23+
- nlopt
24+
- path
25+
- pip
26+
- numpy=1
27+
- scipy=1
28+
- cadquery

0 commit comments

Comments
 (0)