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
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:

jobs:
lint:
name: Quick Lint (PRs only)
name: Quick Lint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
Expand All @@ -38,7 +38,6 @@ jobs:
- name: Run linters
run: |
black --check .
flake8 .

test:
name: Full Tests
Expand Down
31 changes: 31 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Github workflows
.github/workflows/

# Python cache
**/__pycache__/
**/*.py[cod]

# venv
venv/

# Train datasets
data/train/
data/test/

# Profiling scripts/ logs
profiler/

# Tests
tests/

# Model weights and checkpoints
model/weights/
checkpoints/

# Model compression logic
compress/

# Temp files
*.log
*.tmp

30 changes: 30 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM python:3.13-slim
LABEL maintainer="soulsharp"
LABEL repository="Compress-Resnet"

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends\
build-essential libblas-dev liblapack-dev \
&& rm -rf /var/lib/apt/lists/*

RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

WORKDIR /app
COPY requirements.txt .

RUN --mount=type=cache,target=/root/.cache/pip \
python -m pip install --upgrade pip \
&& python -m pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu126 \
&& python -m pip install -r requirements.txt

COPY . .

# Creates missing files that werent copied
RUN mkdir -p /data/test /model/weights

# Container paths to datasets
ENV TEST_DATASET_PATH="/data/test"
ENV MODEL_WT_PATH="/model/weights"

CMD ["python", "-m", "scripts.run_benchmark"]
28 changes: 14 additions & 14 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ptflops
tensorboard
torch
torchvision
onnx
onnxruntime
onnxsim
numpy
matplotlib
torchinfo
PyYAML
pytorch-lightning
pytest
pytest-mock
ptflops==0.7.5
tensorboard==2.19.0
# torch==2.8.0
# torchvision==0.23.0
# onnx
# onnxruntime
# onnxsim
numpy==2.0.2
matplotlib==3.10.0
torchinfo==1.8.0
PyYAML==6.0.2
pytorch-lightning==2.5.4
pytest==8.4.1
pytest-mock==3.14.1
Loading