Skip to content

Commit

Permalink
Merge pull request #440 from IBM/docker-make-docs
Browse files Browse the repository at this point in the history
Fix Dockerfiles to doc the copied main() src file. remove RUNTIME from Makefiles
  • Loading branch information
daw3rd authored Jul 24, 2024
2 parents 7cfc16c + 3486bca commit 8a16fd6
Show file tree
Hide file tree
Showing 28 changed files with 72 additions and 42 deletions.
8 changes: 3 additions & 5 deletions transforms/code/code2parquet/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ COPY --chown=dpk:root src/ src/
COPY --chown=dpk:root pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

#COPY requirements.txt requirements.txt
#RUN pip install --no-cache-dir -r requirements.txt

# copy source data
COPY ./src/code2parquet_transform.py .
# copy the main() entry point to the image
COPY ./src/code2parquet_transform_python.py .

# copy some of the samples in
COPY ./src/code2parquet_local.py local/

# copy test
Expand Down
1 change: 0 additions & 1 deletion transforms/code/code2parquet/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ REPOROOT=../../../..

# $(REPOROOT)/.make.versions file contains the versions

TRANSFORM_RUNTIME=python
TRANSFORM_NAME=code2parquet

include $(REPOROOT)/transforms/.make.transforms
Expand Down
4 changes: 3 additions & 1 deletion transforms/code/code2parquet/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source
# copy the main() entry point to the image
COPY src/code2parquet_transform_ray.py .

# copy some of the samples in
COPY src/code2parquet_local_ray.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/code/code_quality/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ RUN pip install --no-cache-dir -e .
#COPY requirements.txt requirements.txt
#RUN pip install --no-cache-dir -r requirements.txt

# copy source data
# copy the main() entry point to the image
COPY ./src/code_quality_transform_python.py .

# copy some of the samples in
COPY ./src/code_quality_local.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/code/code_quality/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/code_quality_transform_ray.py .

# copy some of the samples in
COPY ./src/code_quality_local_ray.py local/

# copy test
Expand Down
3 changes: 3 additions & 0 deletions transforms/code/malware/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy the main() entry point to the image
COPY src/malware_transform_ray.py ./

# copy some of the samples in
COPY src/malware_local_ray.py local/

COPY test/ test/
Expand Down
5 changes: 3 additions & 2 deletions transforms/code/proglang_select/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ COPY --chown=dpk:root src/ src/
COPY --chown=dpk:root pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .


# copy source data
# copy the main() entry point to the image
COPY ./src/proglang_select_transform_python.py .

# copy some of the samples in
COPY ./src/proglang_select_local.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/code/proglang_select/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/proglang_select_transform_ray.py .

# copy some of the samples in
COPY ./src/proglang_select_local_ray.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/language/lang_id/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ USER dpk
#COPY requirements.txt requirements.txt
#RUN pip install --no-cache-dir -r requirements.txt

# copy source data
# copy the main() entry point to the image
COPY ./src/lang_id_transform_python.py .

# copy some of the samples in
COPY ./src/lang_id_local.py local/

# copy test
Expand Down
1 change: 0 additions & 1 deletion transforms/language/lang_id/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ REPOROOT=../../../..

# $(REPOROOT)/.make.versions file contains the versions

TRANSFORM_RUNTIME=python
TRANSFORM_NAME=lang_id

include $(REPOROOT)/transforms/.make.transforms
Expand Down
4 changes: 3 additions & 1 deletion transforms/language/lang_id/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ RUN sudo apt remove gcc g++ -y \
&& sudo rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
USER ray

# copy source data
# copy the main() entry point to the image
COPY ./src/lang_id_transform_ray.py .

# copy some of the samples in
COPY ./src/lang_id_local_ray.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/doc_id/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ COPY --chown=ray:users pyproject.toml pyproject.toml
COPY --chown=ray:users README.md README.md
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/doc_id_transform_ray.py .

# copy some of the samples in
COPY src/doc_id_local_ray.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/doc_id/spark/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ COPY --chown=spark:root src/ src/
COPY --chown=spark:root pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source main
# copy the main() entry point to the image
COPY ./src/doc_id_transform_spark.py .

# copy some of the samples in
COPY ./src/doc_id_local.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/ededup/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ COPY --chown=ray:users README.md README.md
COPY --chown=ray:users images/ images/
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/ededup_transform_ray.py .

# copy some of the samples in
COPY src/ededup_local_ray.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/fdedup/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ COPY --chown=ray:users README.md README.md
COPY --chown=ray:users images/ images/
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/fdedup_transform_ray.py .

# copy some of the samples in
COPY src/fdedup_local_ray.py local/

# copy test
Expand Down
8 changes: 3 additions & 5 deletions transforms/universal/filter/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ COPY --chown=dpk:root src/ src/
COPY --chown=dpk:root pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

#COPY requirements.txt requirements.txt
#RUN pip install --no-cache-dir -r requirements.txt

# copy source data
COPY ./src/filter_transform.py .
# copy the main() entry point to the image
COPY ./src/filter_transform_python.py .

# copy some of the samples in
COPY ./src/filter_local.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/filter/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/filter_transform_ray.py .

# copy some of the samples in
COPY src/filter_local_ray.py local/

# copy test
Expand Down
5 changes: 3 additions & 2 deletions transforms/universal/filter/spark/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ COPY --chown=spark:root src/ src/
COPY --chown=spark:root pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source main

# copy the main() entry point to the image
COPY ./src/filter_transform_spark.py .

# copy some of the samples in
COPY ./src/filter_local.py local/

# copy test
Expand Down
8 changes: 3 additions & 5 deletions transforms/universal/noop/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ COPY --chown=dpk:root src/ src/
COPY --chown=dpk:root pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

#COPY requirements.txt requirements.txt
#RUN pip install --no-cache-dir -r requirements.txt

# copy source data
COPY ./src/noop_transform.py .
# copy transform main() entry point to the image
COPY ./src/noop_transform_python.py .

# copy some of the samples in
COPY ./src/noop_local.py local/

# copy test
Expand Down
1 change: 0 additions & 1 deletion transforms/universal/noop/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ REPOROOT=../../../..

# $(REPOROOT)/.make.versions file contains the versions

TRANSFORM_RUNTIME=python
TRANSFORM_NAME=noop

include $(REPOROOT)/transforms/.make.transforms
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/noop/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/noop_transform_ray.py .

# copy some of the samples in
COPY ./src/noop_local_ray.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/noop/spark/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ COPY --chown=root:root src/ src/
COPY --chown=root:root pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source data
# copy in the main() entry point to the image
COPY ./src/noop_transform_spark.py .

# Copy in some samples
COPY ./src/noop_local_spark.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/profiler/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ COPY --chown=ray:users pyproject.toml pyproject.toml
COPY --chown=ray:users README.md README.md
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY src/profiler_transform_ray.py .

# copy some of the samples in
COPY src/profiler_local_ray.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/resize/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ COPY --chown=dpk:users pyproject.toml pyproject.toml
COPY --chown=dpk:users README.md Readme.md
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/resize_transform_python.py .

# copy some of the samples in
COPY ./src/resize_local.py local/

# copy test
Expand Down
1 change: 0 additions & 1 deletion transforms/universal/resize/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ REPOROOT=../../../..

# $(REPOROOT)/.make.versions file contains the versions

TRANSFORM_RUNTIME=python
TRANSFORM_NAME=resize

include $(REPOROOT)/transforms/.make.transforms
Expand Down
3 changes: 3 additions & 0 deletions transforms/universal/resize/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy the main() entry point to the image
COPY ./src/resize_transform_ray.py ./

# copy some of the samples in
COPY ./src/resize_local_ray.py local/

# Install pytest so we can test the image later
Expand Down
6 changes: 3 additions & 3 deletions transforms/universal/tokenization/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ RUN pip install --no-cache-dir -e .
#COPY requirements.txt requirements.txt
#RUN pip install --no-cache-dir -r requirements.txt

# copy source data
COPY ./src/tokenization_transform.py .
# copy the main() entry point to the image
COPY ./src/tokenization_transform_python.py .
COPY ./src/tokenization_utils.py .

# copy some of the samples in
COPY src/tokenization_local_python.py local/

# copy test
Expand Down
4 changes: 3 additions & 1 deletion transforms/universal/tokenization/ray/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ COPY --chown=ray:users src/ src/
COPY --chown=ray:users pyproject.toml pyproject.toml
RUN pip install --no-cache-dir -e .

# copy source data
# copy the main() entry point to the image
COPY ./src/tokenization_transform_ray.py .

# copy some of the samples in
COPY src/tokenization_local_ray.py local/

# copy test
Expand Down

0 comments on commit 8a16fd6

Please sign in to comment.