Skip to content
Snippets Groups Projects
Commit 60ba209c authored by Panagiotis Karamolegkos's avatar Panagiotis Karamolegkos :v_tone2:
Browse files

Added collaborators and removed the images directory

parent b224d0bd
No related branches found
No related tags found
1 merge request!7Added Apache 2 Information on Files
Pipeline #55959 passed
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
Showing
with 29 additions and 305 deletions
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# Panagiotis Karamolegkos (UPRC) - Author
stages:
- build
......
......@@ -16,7 +16,7 @@
~ SPDX-License-Identifier: Apache-2.0
~
~ Contributors:
~ [name] - [contribution]
~ Panagiotis Karamolegkos (UPRC) - Author
-->
# Prerequisites
......
......@@ -15,9 +15,8 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Panagiotis Karamolegkos (UPRC) - Author
# Author: Panagiotis Karamolegkos (UPRC)
# chmod -R 777 apply_yamls.sh
# ./apply_yamls.sh
......
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# ONLY HERE AS AN EXAMPLE
# Author: Panagiotis Karamolegkos (UPRC)
apiVersion: v1
kind: Pod
metadata:
name: context-awareness-pod
spec:
containers:
- name: pdlc-ca
image: docker.io/hecodeco/pdlc-ca:v0.0.0 # Needs to be changed
volumeMounts:
- name: shared-volume
mountPath: /data
readOnly: true
volumes:
- name: shared-volume
persistentVolumeClaim:
claimName: shared-pvc-ro
......@@ -15,9 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Author: Panagiotis Karamolegkos (UPRC)
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: apps/v1
kind: Deployment
......
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# ONLY HERE AS AN EXAMPLE
# Author: Panagiotis Karamolegkos (UPRC)
apiVersion: v1
kind: Pod
metadata:
name: data-preprocessing-pod
spec:
containers:
- name: writer
image: docker.io/sonem/pdlc-writer:v0.0.2 # Needs to be changed
volumeMounts:
- name: shared-volume
mountPath: /data
volumes:
- name: shared-volume
persistentVolumeClaim:
claimName: shared-pvc-rw
......@@ -15,9 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Author: Panagiotis Karamolegkos (UPRC)
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: apps/v1
kind: Deployment
......
......@@ -15,9 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Author: Panagiotis Karamolegkos (UPRC)
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding # RoleBinding
......
......@@ -15,9 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Author: Panagiotis Karamolegkos (UPRC)
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole # Role
......
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# ONLY HERE AS AN EXAMPLE
# Author: Panagiotis Karamolegkos (UPRC)
apiVersion: v1
kind: Pod
metadata:
name: gnn-model-pod
spec:
containers:
- name: reader
image: docker.io/sonem/pdlc-reader:v0.0.2 # Needs to be changed
volumeMounts:
- name: shared-volume
mountPath: /data
readOnly: true
volumes:
- name: shared-volume
persistentVolumeClaim:
claimName: shared-pvc-ro
......@@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding # RoleBinding
......
......@@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole # Role
......
......@@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: apps/v1
kind: Deployment
......
......@@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Panagiotis Karamolegkos (UPRC) - Author
apiVersion: apps/v1
kind: Deployment
......
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
FROM python:3.8.10
WORKDIR /app
# Get the needed files
COPY reader.py /app
COPY requirements.txt /app
# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# Install requirements
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "-u", "reader.py"]
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Execute the following to create the images
docker build \
--tag sonem/pdlc-reader:v0.0.2 .
docker push sonem/pdlc-reader:v0.0.2
# Execute the following to make the image multiarchitectural
docker buildx build \
--push \
-f Dockerfile \
--platform linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8 \
--tag sonem/pdlc-reader:v0.0.2 .
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# The code below is reading the content of the first line of the file a file
# in the /data directory and printing it to the console.
import os
import time
def read_and_print_first_line(filename):
# Wait until directory and file exist
while not os.path.exists(os.path.dirname(filename)):
time.sleep(1)
while not os.path.exists(filename):
time.sleep(1)
while True:
with open(filename, 'r') as file:
first_line = file.readline().strip() # Read the first line and remove any leading/trailing whitespaces
if first_line:
print(first_line)
else:
print("File is empty.")
time.sleep(2)
if __name__ == "__main__":
filename = "/data/current_time.txt"
read_and_print_first_line(filename)
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
FROM python:3.8.10
WORKDIR /app
# Get the needed files
COPY writer.py /app
COPY requirements.txt /app
# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# Install requirements
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "-u", "writer.py"]
# Copyright (c) 2024 University of Piraeus Research Centre
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
# Contributors:
# [name] - [contribution]
# Execute the following to create the images
docker build \
--tag sonem/pdlc-writer:v0.0.2 .
docker push sonem/pdlc-writer:v0.0.2
# Execute the following to make the image multiarchitectural
docker buildx build \
--push \
-f Dockerfile \
--platform linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8 \
--tag sonem/pdlc-writer:v0.0.2 .
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment