Skip to content

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

Description

@protatoes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions