Reputation: 1
I am trying a build a docker image, but I am running into the package installation issue. When I run docker build -t bsn-server .
,
I get the following error:
21.75 Collecting idna==3.7
21.78 Downloading idna-3.7-py3-none-any.whl (66 kB)
21.81 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 2.7 MB/s eta 0:00:00
21.92 ERROR: Could not find a version that satisfies the requirement ifcopenshell==0.7.0.240521 (from versions: none)
21.92 ERROR: No matching distribution found for ifcopenshell==0.7.0.240521
22.09
22.09 [notice] A new release of pip available: 22.3.1 -> 24.2
22.09 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:12
--------------------
11 | # Install Python dependencies
12 | >>> RUN apt-get update && \
13 | >>> apt-get install -y gcc build-essential && \
14 | >>> pip install --no-cache-dir -r /app/requirements.txt
15 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y gcc build-essential && pip install --no-cache-dir -r /app/requirements.txt" did not complete successfully: exit code: 1
The package installs when I install it locally using pip install ifcopenshell==0.7.0.240521. I am not sure why it is not being installed during the docker build
The following are the relevant packages from my requirements.txt
ifcopenshell==0.7.0.240521
bpy=4.0.0
The following is the docker file:
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container
COPY . .
# Expose the port that the app runs on
EXPOSE 8000
# Define environment variable
ENV UVICORN_APP=server:combined_asgi_app
ENV UVICORN_HOST=0.0.0.0
ENV UVICORN_PORT=8000
ENV UVICORN_RELOAD=True
# Run the application
CMD ["uvicorn", "server:combined_asgi_app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
Upvotes: 0
Views: 43