diff --git a/Dockerfile b/Dockerfile index 5254f04..3f8d06f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,18 @@ WORKDIR /app COPY src/requirements.txt . RUN pip install -r requirements.txt +RUN curl -sL https://deb.nodesource.com/setup_18.x | bash && apt install nodejs + +# Install the node components. +COPY src/webcam/webui /tmp/webui +RUN npm i /tmp/webui/ + # Copy the application source code. COPY src . -CMD ["taipy", "run", "--no-debug", "--no-reloader", "main.py", "-H", "0.0.0.0", "-P", "5000"] +# Build the extension. +RUN cd webcam/webui && rm package-lock.json && npm i && \ + npm i /usr/local/lib/python3.11/site-packages/taipy/gui/webapp && \ + npm run build && cd - + +CMD ["taipy", "run", "--no-debug", "--no-reloader", "main.py", "-H", "0.0.0.0", "-P", "5000"] \ No newline at end of file diff --git a/src/webcam/webui/webpack.config.js b/src/webcam/webui/webpack.config.js index b1e3a41..55c9ba4 100644 --- a/src/webcam/webui/webpack.config.js +++ b/src/webcam/webui/webpack.config.js @@ -41,7 +41,7 @@ module.exports = (env, options) => { // This pathname should point to the location of /webapp/taipy-gui-deps-manifest.json // where is the installation directory for Taipy GUI on your filesystem. // You may want to use the script 'find_taipy_gui_dir.py' to get this information. - manifest: path.resolve('C:/Users/jacta/.conda/envs/face/lib/site-packages/taipy/gui/webapp/taipy-gui-deps-manifest.json'), + manifest: path.resolve('/usr/local/lib/python3.11/site-packages/taipy/gui/webapp/taipy-gui-deps-manifest.json'), name: 'TaipyGuiDependencies' }), ]