Skip to content

Commit 4af77d7

Browse files
authored
Merge pull request #123 from Wakoma/alpha_patch_01
Code fixes and final patches for alpha.
2 parents 819dd0b + b265d7a commit 4af77d7

File tree

4 files changed

+68
-102
lines changed

4 files changed

+68
-102
lines changed

docker/Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ RUN pip install --upgrade pip
2020
RUN pip install pytest pylint
2121

2222
WORKDIR /app
23-
RUN git clone https://github.com/Wakoma/nimble.git --branch alpha
23+
RUN git clone https://github.com/Wakoma/nimble.git --branch master
2424

2525
WORKDIR /app/nimble
2626
RUN pip install -e .
2727

2828
WORKDIR /app
29-
RUN git clone https://gitlab.com/gitbuilding/cadorchestrator.git --branch server_hotfix_01
29+
RUN git clone https://gitlab.com/gitbuilding/cadorchestrator.git --branch master
3030

3131
WORKDIR /app/cadorchestrator/js/cadorchestrator-app
3232
RUN bun install && \
@@ -35,10 +35,6 @@ RUN bun install && \
3535
WORKDIR /app/cadorchestrator
3636
RUN pip install -e .
3737

38-
39-
ARG NOCODB_TOKEN
40-
ENV NOCODB_TOKEN=${NOCODB_TOKEN}
41-
4238
WORKDIR /app/nimble
4339
RUN Xvfb :98 -screen 0 1024x768x24 & \
4440
export DISPLAY=:98 && \
@@ -47,8 +43,7 @@ RUN Xvfb :98 -screen 0 1024x768x24 & \
4743
RUN rm -rf build _cache_ _gb_temp_ && \
4844
rm OrchestratorConfigOptions.json devices.json
4945

50-
RUN nimble_devices_updater && \
51-
gen_nimble_conf_options
46+
RUN gen_nimble_conf_options
5247

5348
RUN pip freeze -l > requirements_inbuild.txt
5449

docker/Dockerfile.dev

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

docker/Dockerfile.prod

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
FROM python:3.10-slim
2+
3+
RUN apt-get update && apt-get install -y \
4+
git \
5+
curl \
6+
xvfb \
7+
fontconfig \
8+
unzip \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
RUN curl -fsSL https://bun.sh/install | bash && \
12+
mv /root/.bun/bin/bun /usr/local/bin/bun
13+
14+
WORKDIR /app
15+
ENV VIRTUAL_ENV=/app/venv
16+
RUN python3 -m venv $VIRTUAL_ENV
17+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
18+
RUN pip install --upgrade pip
19+
20+
RUN pip install pytest pylint
21+
22+
WORKDIR /app
23+
RUN git clone https://github.com/Wakoma/nimble.git --branch master
24+
25+
WORKDIR /app/nimble
26+
RUN pip install -e .
27+
28+
WORKDIR /app
29+
RUN git clone https://gitlab.com/gitbuilding/cadorchestrator.git --branch master
30+
31+
WORKDIR /app/cadorchestrator/js/cadorchestrator-app
32+
RUN bun install && \
33+
bun run build
34+
35+
WORKDIR /app/cadorchestrator
36+
RUN pip install -e .
37+
38+
39+
ARG NOCODB_TOKEN
40+
ENV NOCODB_TOKEN=${NOCODB_TOKEN}
41+
42+
WORKDIR /app/nimble
43+
RUN Xvfb :98 -screen 0 1024x768x24 & \
44+
export DISPLAY=:98 && \
45+
python -m pytest
46+
47+
RUN rm -rf build _cache_ _gb_temp_ && \
48+
rm OrchestratorConfigOptions.json devices.json
49+
50+
RUN nimble_devices_updater && \
51+
gen_nimble_conf_options
52+
53+
RUN pip freeze -l > requirements_inbuild.txt
54+
55+
EXPOSE 8000
56+
57+
WORKDIR /app
58+
COPY entrypoint.sh /app/entrypoint.sh
59+
RUN ["chmod","+x","entrypoint.sh"]
60+
61+
WORKDIR /app/nimble
62+
ENTRYPOINT ["/app/entrypoint.sh"]

nimble_build_system/orchestration/configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88
from copy import deepcopy
99
import posixpath
10-
import logging
10+
1111

1212
from cadorchestrator.components import (GeneratedMechanicalComponent,
1313
AssembledComponent,
@@ -17,6 +17,8 @@
1717
from nimble_build_system.cad.shelf import create_shelf_for
1818
from nimble_build_system.orchestration.paths import REL_MECH_DIR
1919

20+
21+
2022
def create_assembly(config_dict):
2123
"""Function uses device id list for nimble configuration assembly."""
2224
selected_device_ids = config_dict['device-ids']
@@ -106,8 +108,6 @@ def _main_assembly_docs(self):
106108
return md
107109

108110
def _inserting_shelf_docs(self):
109-
logging.info("-"*10)
110-
111111
broad_shelf_mds = []
112112
std_shelf_mds = []
113113
for i, shelf in enumerate(self._shelves):
@@ -137,7 +137,6 @@ def devices(self):
137137
"""
138138
Return the devices in this configuration as a list of Device objects
139139
"""
140-
141140
return [shelf.device for shelf in self._shelves]
142141

143142

0 commit comments

Comments
 (0)