File tree Expand file tree Collapse file tree 4 files changed +64
-0
lines changed
Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ ** /* .venv
2+ ** /__pycache__
3+ ** /* .egg-info
4+ ** /* .env
5+ ** /* test
6+ ** /* .json
7+ autotuner_env
8+ * .log
Original file line number Diff line number Diff line change @@ -10,3 +10,6 @@ __pycache__/
1010# Autotuner env
1111autotuner_env
1212.env
13+
14+ # Log files
15+ docker-build.log
Original file line number Diff line number Diff line change 1+ ARG BASE_IMAGE
2+ FROM ${BASE_IMAGE:-openroad/orfs:latest}
3+
4+ # Set workdir
5+ WORKDIR /OpenROAD-flow-scripts/tools/AutoTuner
6+
7+ # Replace pre-existing AT files with local copy
8+ RUN rm -rf /OpenROAD-flow-scripts/tools/AutoTuner
9+
10+ # Create venv
11+ RUN python3 -m venv .venv
12+ ENV PATH="/OpenROAD-flow-scripts/tools/AutoTuner/.venv:${PATH}"
13+
14+ # Copy only requirements first for better caching of pip install
15+ COPY requirements.txt .
16+
17+ # Upgrade pip and install Python dependencies
18+ RUN pip3 install --no-cache-dir --upgrade pip && \
19+ pip3 install --no-cache-dir -r requirements.txt
20+
21+ # Copy full source after installing dependencies
22+ COPY . .
23+
24+ # Install package in editable mode
25+ RUN pip3 install --no-cache-dir -e .
Original file line number Diff line number Diff line change 1+ include .env
2+ export
3+
4+ BASE_TAG =$(shell cd ../../ && ./etc/DockerTag.sh -dev)
5+ ORFS_IMAGE := openroad/orfs:latest
6+ ORFS_AUTOTUNER_IMAGE := orfs-autotuner
7+
8+ .PHONY : clean
9+ clean :
10+ @echo " Cleaning up old images"
11+ @docker rmi ${ORFS_AUTOTUNER_IMAGE} :latest || true
12+
13+ .PHONY : docker
14+ docker : clean
15+ @echo " Building docker image..."
16+ @docker build -t ${ORFS_AUTOTUNER_IMAGE} :latest -f Dockerfile --build-arg BASE_IMAGE=${ORFS_IMAGE} . | tee docker-build.log
17+ @docker tag ${ORFS_AUTOTUNER_IMAGE} :latest ${ORFS_AUTOTUNER_IMAGE} :$(BASE_TAG )
18+
19+ .PHONY : upload
20+ upload : docker
21+ @echo " Uploading docker image..."
22+ @docker login -u $(DOCKERHUB_USERNAME ) -p $(DOCKERHUB_PASSWORD )
23+ @echo " Base image: $( BASE_TAG) "
24+ @docker tag ${ORFS_AUTOTUNER_IMAGE} :latest ${DOCKERHUB_USERNAME} /${ORFS_AUTOTUNER_IMAGE} :$(BASE_TAG )
25+ @docker tag ${ORFS_AUTOTUNER_IMAGE} :latest ${DOCKERHUB_USERNAME} /${ORFS_AUTOTUNER_IMAGE} :latest
26+ @docker push ${DOCKERHUB_USERNAME} /${ORFS_AUTOTUNER_IMAGE} :$(BASE_TAG )
27+ @docker push ${DOCKERHUB_USERNAME} /${ORFS_AUTOTUNER_IMAGE} :latest
28+ @docker logout
You can’t perform that action at this time.
0 commit comments