Skip to content

Commit

Permalink
Merge pull request #1576 from codalab/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
Didayolo authored Oct 29, 2024
2 parents 7cf7a6e + 1bd7c6f commit 919a5d1
Show file tree
Hide file tree
Showing 62 changed files with 4,715 additions and 312 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release-version-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Update version.json and create PR

on:
release:
types: [published]

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get release information
id: get_release
uses: dawidd6/action-get-latest-release@v3
with:
release: true

- name: Update version.json
run: |
echo '{
"tag_name": "${{ steps.get_release.outputs.tag_name }}",
"release_name": "${{ steps.get_release.outputs.name }}",
"published_at": "${{ steps.get_release.outputs.published_at }}",
"body": "${{ steps.get_release.outputs.body }}"
"release_url": "${{ steps.get_release.outputs.html_url }}"
}' > version.json
- name: Create new branch
run: |
git checkout -b update-version-${{ steps.get_release.outputs.tag_name }}
git add version.json
git commit -m "Update version.json for release ${{ steps.get_release.outputs.tag_name }}"
- name: Push branch
run: |
git push origin update-version-${{ steps.get_release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-version-${{ steps.get_release.outputs.tag_name }}
title: "Update version.json for release ${{ steps.get_release.outputs.tag_name }}"
body: "This PR updates version.json with the latest release information."
base: develop # Target branch for the pull request
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ server_config.yaml

.DS_Store
.DS_Store?

caddy_config/
caddy_data/
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
FROM python:3.9
FROM python:3.9.20

RUN apt-get update && apt-get install -y gcc build-essential && rm -rf /var/lib/apt/lists/*

ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1


RUN curl -sSL https://install.python-poetry.org | python3 -
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
# Poetry location so future commands (below) work
ENV PATH $PATH:/root/.local/bin

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

COPY pyproject.toml ./
COPY pyproject.toml poetry.lock ./

# Install dependencies
RUN poetry install

RUN poetry lock
RUN poetry install

WORKDIR /app
2 changes: 1 addition & 1 deletion Dockerfile.compute_worker
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV PYTHONUNBUFFERED 1
RUN apt-get update && curl -fsSL https://get.docker.com | sh


RUN curl -sSL https://install.python-poetry.org | python3 -
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
# Poetry location so future commands (below) work
ENV PATH $PATH:/root/.local/bin
# Want poetry to use system python of docker container
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.compute_worker_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt-get install -y nvidia-container-toolkit
# BB - not convinced we need this
ENV USE_GPU 1

RUN curl -sSL https://install.python-poetry.org | python3 -
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
# Poetry location so future commands (below) work
ENV PATH $PATH:/root/.local/bin
# Want poetry to use system python of docker container
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.flower
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED=1 PYTHONHASHSEED=random PYTHONDONTWRITEBYTECODE=1
RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates

# # Install the required packages
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
# Poetry location so future commands (below) work
ENV PATH $PATH:/root/.local/bin
# Want poetry to use system python of docker container
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.rabbitmq
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM rabbitmq:management
FROM rabbitmq:3.13.7-management
ARG WORKER_CONNECTION_TIMEOUT
RUN echo "consumer_timeout = $WORKER_CONNECTION_TIMEOUT" >> /etc/rabbitmq/conf.d/10-defaults.conf
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ If you wish to configure your own instance of Codabench platform, here are the i

```
$ cp .env_sample .env
$ docker-compose up -d
$ docker-compose exec django ./manage.py migrate
$ docker-compose exec django ./manage.py generate_data
$ docker-compose exec django ./manage.py collectstatic --noinput
$ docker compose up -d
$ docker compose exec django ./manage.py migrate
$ docker compose exec django ./manage.py generate_data
$ docker compose exec django ./manage.py collectstatic --noinput
```

You can now login as username "admin" with password "admin" at http://localhost/
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
django:
build: .
# NOTE: We use watchmedo to reload gunicorn nicely, Uvicorn + Gunicorn reloads don't work well
command: bash -c "cd /app/src && watchmedo auto-restart -p '*.py' --recursive -- gunicorn asgi:application -w 2 -k uvicorn.workers.UvicornWorker -b :8000 -b :80 --capture-output --log-level debug"
command: bash -c "python manage.py collectstatic --noinput && cd /app/src && watchmedo auto-restart -p '*.py' --recursive -- gunicorn asgi:application -w 2 -k uvicorn.workers.UvicornWorker -b :8000 -b :80 --capture-output --log-level debug"
environment:
- DATABASE_URL=postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
env_file: .env
Expand Down
Loading

0 comments on commit 919a5d1

Please sign in to comment.