Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Minor test fixes #464

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG SAGEMAKER_DISTRIBUTION_IMAGE
FROM $SAGEMAKER_DISTRIBUTION_IMAGE

ARG MAMBA_DOCKERFILE_ACTIVATE=1

CMD ["python", "-c", "import amazon_q_developer_jupyterlab_ext"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG SAGEMAKER_DISTRIBUTION_IMAGE
FROM $SAGEMAKER_DISTRIBUTION_IMAGE

ARG MAMBA_DOCKERFILE_ACTIVATE=1

CMD ["python", "-c", "import amazon_sagemaker_jupyter_ai_q_developer"]
2 changes: 1 addition & 1 deletion test/test_artifacts/v1/gpu-dependencies.test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ARG MAMBA_DOCKERFILE_ACTIVATE=1
# 2. Check if Pytorch is installed with CUDA support for GPU image
COPY --chown=$MAMBA_USER:$MAMBA_USER scripts/cuda_validation.py .
RUN chmod +x cuda_validation.py
RUN python3 cuda_validation.py
CMD python3 cuda_validation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ARG SAGEMAKER_DISTRIBUTION_IMAGE
FROM $SAGEMAKER_DISTRIBUTION_IMAGE

ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN micromamba install pytest --freeze-installed --yes --channel conda-forge --name base
RUN micromamba install pytest-jupyter --freeze-installed --yes --channel conda-forge --name base
RUN SITE_PACKAGES=$(pip show jupyter-activity-monitor-extension | grep Location | awk '{print $2}') && \
cd "$SITE_PACKAGES/jupyter_activity_monitor_extension/tests/" && pytest -p pytest_jupyter.jupyter_server
5 changes: 0 additions & 5 deletions test/test_artifacts/v1/pytorch.examples.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ RUN sudo ln -s /usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/x86_64-linux-gnu/

WORKDIR "examples"

# There is a line in run_python_examples.sh which looks like: BASE_DIR=`pwd`"/"`dirname $0`
# When we run the shell script through /usr/local/bin/_entrypoint.sh, that line above doesn't work correctly. In our
# case, we properly set `pwd` to the directory that contains all the examples, so we just modify the script to change
# the previous line to look like: BASE_DIR=`pwd`
RUN sed -i 's/^BASE_DIR=.*pwd.*dirname.*/BASE_DIR=`pwd`/' run_python_examples.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer needed, and actually causes failures with change to the test package

RUN ./run_python_examples.sh install_deps

# We skip `imagenet` because it requires a lot of resources and so aren't a good fit for us.
Expand Down