Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docker/Dockerfile-gunicorn
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
FROM python:3.13.7-slim-bookworm
ENV DEBIAN_FRONTEND=noninteractive

ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG NO_PROXY
ARG http_proxy
ARG https_proxy
ARG no_proxy

WORKDIR /var/www/startup/
COPY requirements.txt requirements.txt
RUN python -m venv venv
Expand Down
7 changes: 7 additions & 0 deletions docker/compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ services:
build:
context: .
dockerfile: Dockerfile-gunicorn
args:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
container_name: green-coding-gunicorn-container
init: true
depends_on:
Expand Down
16 changes: 13 additions & 3 deletions tests/data/bare-metal/usage_scenario.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ services:
ubuntu-systemd-docker:
type: container
image: greencoding/ubuntu-systemd-docker
networks:
- bridge
volumes:
- gmt-tests-pip-cache:/root/.cache/pip/
- gmt-tests-apt-package-cache:/var/cache/apt/
- gmt-tests-apt-list-cache:/var/lib/apt/lists/
- gmt-tests-buildkit-cache:/root/.cache/buildkit-gmt/
setup-commands:
- command: rm /etc/apt/apt.conf.d/docker-clean # the image comes with a script that deletes all apt packages after install. we do not want that

flow:
- name: Pull GMT
Expand All @@ -20,7 +29,7 @@ flow:
container: ubuntu-systemd-docker
commands:
- type: console
# we set here --nvidia-gpu altough the M4 machine does not have any. We want to test if the headers can be correctly downloaded
# we set here --nvidia-gpu although the M4 machine does not have any. We want to test if the headers can be correctly downloaded
command: |
cd ~/green-metrics-tool
./install_linux.sh -p testpw -a http://api.green-coding.internal:9142 -m http://metrics.green-coding.internal:9142 -T -L -z -f -j -d -g --nvidia-gpu
Expand All @@ -43,8 +52,8 @@ flow:
commands:
- type: console
command: |
source venv/bin/activate
cd ~/green-metrics-tool/tests
source ../venv/bin/activate
python3 setup-test-env.py
shell: bash

Expand All @@ -65,7 +74,8 @@ flow:
- type: console
command: |
cd ~/green-metrics-tool/tests
python3 -m pytest -vv -rA
source ../venv/bin/activate
python3 -m pytest --durations=0 -vv -rA
shell: bash

- name: Stop Test Containers
Expand Down