Skip to content

Commit

Permalink
Integrated pyicub-frontend v8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ddetommaso committed Jan 12, 2024
1 parent 0da6f4f commit 994b6f6
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .dockyman/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ifeq ($(UNAME), Linux)
ifeq ($(shell lsb_release -is), Ubuntu)
PACKAGE_MANAGER := apt-get
DOCKER_INSTALL_CMD := curl -fsSL https://get.docker.com | sh
DOCKER_COMPOSE_INSTALL_CMD := sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(shell uname -s)-$(shell uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
DOCKER_COMPOSE_INSTALL_CMD := sudo curl -L "https://github.com/docker/compose/releases/download/v2.23.3/docker-compose-$(shell uname -s)-$(shell uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
NVIDIA_DOCKER_INSTALL_CMD := distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - && curl -s -L https://nvidia.github.io/nvidia-docker/$$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list && sudo apt-get update && sudo apt-get install -y nvidia-docker2 && sudo systemctl restart docker
else ifeq ($(shell cat /etc/os-release | grep '^ID=' | cut -d= -f2), centos)
PACKAGE_MANAGER := yum
Expand Down
2 changes: 2 additions & 0 deletions .dockyman/profiles/local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

version: '3.8'

services:

local:
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
![PYICUB logo](media/pyicublab-logo.png?raw=true)
====

Requirements
------------

- make
- docker

```
sudo apt-get install build-essential
```

Introduction
------------

Expand Down
3 changes: 1 addition & 2 deletions base/pyicub-frontend/.devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"build":
{
"dockerfile": "Dockerfile",
"args": { "DOCKER_SRC": "${localEnv:DOCKER_SRC}",
"PYICUB_FRONTEND_VERSION": "${localEnv:PYICUB_FRONTEND_VERSION}" }
"args": { "PYICUB_FRONTEND_VERSION": "${localEnv:PYICUB_FRONTEND_VERSION}" }
}

}
29 changes: 8 additions & 21 deletions base/pyicub-frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,18 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

FROM node:16

FROM node:21
ARG PYICUB_FRONTEND_VERSION=master

RUN mkdir /app
WORKDIR /app

# Create react app
RUN npx create-react-app pyicub-frontend

# Define work directory
WORKDIR /app/pyicub-frontend

RUN npm ci
RUN npm install @mui/material @emotion/react @emotion/styled
RUN npm install bootstrap@3
RUN npm install react-iframe
RUN npm install react-router-dom@6
RUN npm i react-icons
RUN npm install http-proxy-middleware --save

RUN mkdir -p /root/.vscode-server /root/.vscode-server-insiders

RUN git clone https://github.com/s4hri/pyicub-frontend -b master tmp

RUN cd tmp && git checkout ${PYICUB_FRONTEND_VERSION}
RUN cp -a tmp/. /app/pyicub-frontend/
RUN rm -rf tmp

CMD ["npm", "start"]
# Define work directory
WORKDIR /app/pyicub-frontend
RUN npm install

CMD npm run production -- --port ${PYICUB_API_FRONTEND_PORT}
4 changes: 2 additions & 2 deletions build.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DOCKYMAN_VER=v1.0
DOCKYMAN_VER=v1.1
REPOSITORY=iitschri
PROFILE=development

Expand All @@ -8,7 +8,7 @@ ICUB_DISTRO=v2022.02.0-ubuntu20.04
PYICUB_BASE_DOCKER_SRC=${REPOSITORY}/robotology-superbuild-docker:${ICUB_DISTRO}
PYICUB_BASE_NAME=${REPOSITORY}/pyicub-docker:${VERSION}
PYICUB_VERSION=${VERSION}
PYICUB_FRONTEND_VERSION=v7.0-distro_${ICUB_DISTRO}
PYICUB_FRONTEND_VERSION=v8.0-distro_${ICUB_DISTRO}
PYICUB_FRONTEND_BASE_NAME=${REPOSITORY}/pyicub-frontend-docker:${PYICUB_FRONTEND_VERSION}

COMPOSE_PROFILES=restapi
Expand Down
2 changes: 1 addition & 1 deletion compose.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

version: '3.8'

services:

Expand Down Expand Up @@ -50,7 +51,6 @@ services:
service: dockyman

environment:
- DOCKER_SRC=${PYICUB_BASE_DOCKER_SRC}
- PYICUB_FRONTEND_VERSION=${PYICUB_FRONTEND_VERSION}

command: --image_name ${PYICUB_FRONTEND_BASE_NAME:?err} --workspace_folder ./base/pyicub-frontend
Expand Down
1 change: 1 addition & 0 deletions compose.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

version: '3.8'

services:

Expand Down
2 changes: 2 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: '3.8'

services:

pyicub:
Expand Down

0 comments on commit 994b6f6

Please sign in to comment.