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

Build Failure: Dockerfile Dependency Installation Errors from req.txt #18

Open
protatoes opened this issue Dec 7, 2023 · 0 comments
Open

Comments

@protatoes
Copy link

protatoes commented Dec 7, 2023

Overview:
I am encountering an issue when building a Docker dev container to run this repo through vs code, specifically during the installation of dependencies from a req.txt file. The build process fails with several errors related to various dependencies.

Environment:

Docker version: 4.26.0
Operating System: Windows 11

Steps To Reproduce:

  1. Build Docker Dev Container using the follow dockerfile and compose files:
# Use Ubuntu as the base image
FROM ubuntu:18.04

# Install Python 3.7
RUN apt-get update && \
    apt-get install -y software-properties-common && \
    add-apt-repository ppa:deadsnakes/ppa && \
    apt-get update && \
    apt-get install -y python3.7 python3-pip python3.7-dev

# Create a working directory
WORKDIR /app

# Copy the requirements file into the container
COPY req.txt /app/

# Install Python dependencies
RUN pip install -r req.txt

# Install JupyterLab
RUN pip install jupyterlab

# Expose the port JupyterLab will use
EXPOSE 8888

# Set up the entry point to launch JupyterLab
ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--NotebookApp.token=''", "--NotebookApp.password=''"]
version: '3.8'

services:
  dev:
    build:
      context: .
      dockerfile: dockerfile.dev
    ports:
      - "8888:8888"
    volumes:
      - .:/app
    command: jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.token='' --NotebookApp.password=''

Expected Behavior:
The Docker container should build without errors, and all dependencies listed in the req.txt file should be installed correctly.

Actual Behavior:
During the build process, the installation of dependencies fails. Dependencies that might be at issue include:
numpy
Werkzeug
pandas
scipy
torch
sci-kitlearn

I would appreciate any guidance on resolving these build errors or suggestions on changes to the Dockerfile or req.txt that might mitigate these issues. Also I would like to raise the question as to why such antiquated packages are being used, many of them are deprecated and no longer supported (e.g. python 3.7 and torch 1.4). The reliance on outdated packages could cause major issues in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant