Skip to content

Commit

Permalink
Merge pull request #1694 from codalab/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
Didayolo authored Dec 19, 2024
2 parents 8891697 + 65861d0 commit 32f11d9
Show file tree
Hide file tree
Showing 32 changed files with 709 additions and 296 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release-version-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ jobs:
id: get_release
run: |
response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/latest)
echo "$response" | jq '.tag_name, .name, .published_at, .body, .html_url' | tee /tmp/release_info
echo "$response" | jq '.tag_name, .name, .published_at, .html_url' | tee /tmp/release_info
echo "tag_name=$(echo "$response" | jq -r .tag_name)" >> $GITHUB_ENV
echo "name=$(echo "$response" | jq -r .name)" >> $GITHUB_ENV
echo "published_at=$(echo "$response" | jq -r .published_at)" >> $GITHUB_ENV
echo "body=$(echo "$response" | jq -r .body)" >> $GITHUB_ENV
echo "html_url=$(echo "$response" | jq -r .html_url)" >> $GITHUB_ENV
# Step 3: Update version.json file with latest information
Expand All @@ -34,7 +33,6 @@ jobs:
"tag_name": "${{ env.tag_name }}",
"release_name": "${{ env.name }}",
"published_at": "${{ env.published_at }}",
"body": "${{ env.body }}",
"html_url": "${{ env.html_url }}"
}' > version.json
Expand Down
19 changes: 13 additions & 6 deletions Containerfile.compute_worker_podman
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ FROM fedora:37
RUN dnf -y update && \
# https://bugzilla.redhat.com/show_bug.cgi?id=1995337#c3
rpm --setcaps shadow-utils 2>/dev/null && \
dnf -y install podman fuse-overlayfs python3.8 python3-pip \
dnf -y install podman fuse-overlayfs python3.9 \
--exclude container-selinux && \
dnf clean all && \
rm -rf /var/cache /var/log/dnf* /var/log/yum.*

# Setup user
# Setup user
RUN useradd worker; \
echo -e "worker:1:999\nworker:1001:64535" > /etc/subuid; \
echo -e "worker:1:999\nworker:1001:64535" > /etc/subgid;
Expand Down Expand Up @@ -47,16 +47,23 @@ RUN echo -e "[registries.search]\nregistries = ['docker.io']\n" > /etc/container
ENV PYTHONUNBUFFERED 1
ENV CONTAINER_ENGINE_EXECUTABLE podman

# Get pip for 3.8
RUN python3.8 -m ensurepip --upgrade

WORKDIR /home/worker/compute_worker

ADD compute_worker/ /home/worker/compute_worker

RUN chown worker:worker -R /home/worker/compute_worker

RUN pip3.8 install -r /home/worker/compute_worker/compute_worker_requirements.txt
RUN curl -sSL https://install.python-poetry.org | python3.9 -
# Poetry location so future commands (below) work
ENV PATH $PATH:/root/.local/bin
# Want poetry to use system python of docker container
RUN poetry config virtualenvs.create false
RUN poetry config virtualenvs.in-project false
# So we get 3.9
RUN poetry config virtualenvs.prefer-active-python true
COPY ./compute_worker/pyproject.toml ./
COPY ./compute_worker/poetry.lock ./
RUN poetry install

CMD celery -A compute_worker worker \
-l info \
Expand Down
21 changes: 15 additions & 6 deletions Containerfile.compute_worker_podman_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ RUN curl -s -L https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x8
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
dnf -y update && \
dnf module install -y nvidia-driver:latest-dkms && \
dnf -y install podman fuse-overlayfs python3.8 python3-pip nvidia-container-runtime nvidia-container-toolkit \
dnf -y install podman fuse-overlayfs python3.9 nvidia-container-runtime nvidia-container-toolkit \
cuda --exclude container-selinux && \
dnf clean all && \
rm -rf /var/cache /var/log/dnf* /var/log/yum.*

# Setup user
# Setup user
RUN useradd worker; \
echo -e "worker:1:999\nworker:1001:64535" > /etc/subuid; \
echo -e "worker:1:999\nworker:1001:64535" > /etc/subgid;
Expand Down Expand Up @@ -49,15 +49,24 @@ RUN mkdir /codabench && \
chown worker:worker /codabench && \
# Set up podman registry for dockerhub
echo -e "[registries.search]\nregistries = ['docker.io']\n" > /etc/containers/registries.conf && \
# Get pip for 3.8
python3.8 -m ensurepip --upgrade

WORKDIR /home/worker/compute_worker

ADD compute_worker/ /home/worker/compute_worker

RUN chown worker:worker -R /home/worker/compute_worker && \
pip3.8 install -r /home/worker/compute_worker/compute_worker_requirements.txt
RUN curl -sSL https://install.python-poetry.org | python3.9 -
# Poetry location so future commands (below) work
ENV PATH $PATH:/root/.local/bin
# Want poetry to use system python of docker container
RUN poetry config virtualenvs.create false
RUN poetry config virtualenvs.in-project false
# So we get 3.9
RUN poetry config virtualenvs.prefer-active-python true
COPY ./compute_worker/pyproject.toml ./
COPY ./compute_worker/poetry.lock ./
RUN poetry install

RUN chown worker:worker -R /home/worker/compute_worker

CMD nvidia-smi && celery -A compute_worker worker \
-l info \
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
# Web Services
#-----------------------------------------------
caddy:
image: caddy:2.7.6
image: caddy:2.8.4
env_file: .env
environment:
- ACME_AGREE=true
Expand Down
6 changes: 6 additions & 0 deletions home_page_counters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"public_competitions": 0,
"users": 0,
"submissions": 0,
"last_updated": "2000-01-01T00:00:00.000000+00:00"
}
Loading

0 comments on commit 32f11d9

Please sign in to comment.