Spaces:
Runtime error
Runtime error
Commit
·
02881ff
1
Parent(s):
2cdedb8
Update Dockerfile to include notebook requirement files
Browse files- Dockerfile +4 -7
Dockerfile
CHANGED
|
@@ -72,6 +72,10 @@ RUN apt-get update && \
|
|
| 72 |
COPY check_gpu.sh /root/check_gpu.sh
|
| 73 |
RUN chmod +x /root/check_gpu.sh
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
# Conditional installation based on GPU availability
|
| 76 |
RUN if /root/check_gpu.sh; then \
|
| 77 |
echo "GPU detected. Installing GPU-specific Python packages." && \
|
|
@@ -81,9 +85,6 @@ RUN if /root/check_gpu.sh; then \
|
|
| 81 |
cp /home/user/notebooks/requirements_cpu.txt /home/user/requirements_specific.txt; \
|
| 82 |
fi
|
| 83 |
|
| 84 |
-
# Copy notebooks directory to a temporary location
|
| 85 |
-
COPY --chown=user notebooks /home/user/notebooks
|
| 86 |
-
|
| 87 |
#######################################
|
| 88 |
# End root user section
|
| 89 |
#######################################
|
|
@@ -92,10 +93,6 @@ USER user
|
|
| 92 |
|
| 93 |
# Python packages
|
| 94 |
COPY base_requirements.txt /home/user/base_requirements.txt
|
| 95 |
-
COPY notebooks/requirements.txt /home/user/notebooks/requirements.txt
|
| 96 |
-
COPY notebooks/requirements_cpu.txt /home/user/notebooks/requirements_cpu.txt
|
| 97 |
-
COPY notebooks/requirements_gpu.txt /home/user/notebooks/requirements_gpu.txt
|
| 98 |
-
|
| 99 |
RUN pip install --no-cache-dir --upgrade -r /home/user/base_requirements.txt -r /home/user/requirements_specific.txt
|
| 100 |
|
| 101 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
|
|
|
| 72 |
COPY check_gpu.sh /root/check_gpu.sh
|
| 73 |
RUN chmod +x /root/check_gpu.sh
|
| 74 |
|
| 75 |
+
# Copy notebook requirement files
|
| 76 |
+
COPY notebooks/requirements_cpu.txt /home/user/notebooks/requirements_cpu.txt
|
| 77 |
+
COPY notebooks/requirements_gpu.txt /home/user/notebooks/requirements_gpu.txt
|
| 78 |
+
|
| 79 |
# Conditional installation based on GPU availability
|
| 80 |
RUN if /root/check_gpu.sh; then \
|
| 81 |
echo "GPU detected. Installing GPU-specific Python packages." && \
|
|
|
|
| 85 |
cp /home/user/notebooks/requirements_cpu.txt /home/user/requirements_specific.txt; \
|
| 86 |
fi
|
| 87 |
|
|
|
|
|
|
|
|
|
|
| 88 |
#######################################
|
| 89 |
# End root user section
|
| 90 |
#######################################
|
|
|
|
| 93 |
|
| 94 |
# Python packages
|
| 95 |
COPY base_requirements.txt /home/user/base_requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
RUN pip install --no-cache-dir --upgrade -r /home/user/base_requirements.txt -r /home/user/requirements_specific.txt
|
| 97 |
|
| 98 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|