Skip to content
Merged
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
15 changes: 13 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,19 @@ OPENAI_API_KEY="your_api_key_here"

### Docker Settings ###
DOCKER_IMAGE=python:3.11-alpine
DOCKER_MEMORY_LIMIT="128, 256, 512"
DOCKER_TIME_LIMIT="2000, 3000, 5000"

DOCKER_IMAGE_PYTHON=beatcode-python:latest
DOCKER_IMAGE_JAVA=beatcode-java:latest
DOCKER_IMAGE_CPP=beatcode-cpp:latest

DOCKER_PYTHON_MEMORY_LIMIT="128, 256, 512"
DOCKER_JAVA_MEMORY_LIMIT="128, 256, 512"
DOCKER_CPP_MEMORY_LIMIT="128, 256, 512"

DOCKER_PYTHON_TIME_LIMIT="2000, 3000, 5000"
DOCKER_JAVA_TIME_LIMIT="15000, 20000, 30000"
DOCKER_CPP_TIME_LIMIT="15000, 20000, 30000"

DOCKER_CPU_LIMIT=0.5

### Game Settings ###
Expand Down
4 changes: 4 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

echo "Format check... (Please run `black .` before pushing)"
black . --check
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ FROM python:3.11-alpine

WORKDIR /app

# Install Docker client
RUN apk add --no-cache docker-cli

# Copy Docker environment files
COPY docker/python/Dockerfile docker/python/
COPY docker/java/Dockerfile docker/java/
COPY docker/cpp/Dockerfile docker/cpp/

# Build execution environment images
RUN docker build -t beatcode-python:latest docker/python/ && \
docker build -t beatcode-java:latest docker/java/ && \
docker build -t beatcode-cpp:latest docker/cpp/

# Continue with app setup
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

Expand Down
Loading