Skip to content

Commit

Permalink
Merge pull request #94 from pabl-o-ce/docker
Browse files Browse the repository at this point in the history
Dockerfile work with pyproject.toml
  • Loading branch information
bdashore3 authored Apr 15, 2024
2 parents 515b3c2 + 8a5a82b commit a2a2e4b
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
# Use an official CUDA runtime with Ubuntu as a parent image
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04

# Install Python and pip
RUN apt-get update && apt-get install -y \
# Set the working directory in the container
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
python3.11 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*

# Set the working directory in the container
WORKDIR /usr/src/app
# Upgrade pip
RUN pip3 install --no-cache-dir --upgrade pip

# Get requirements
COPY requirements.txt requirements.txt
COPY pyproject.toml .

# Install packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Install packages specified in pyproject.toml cu121
RUN pip3 install --no-cache-dir .[cu121]

# Copy the current directory contents into the container at /usr/src/app
# Copy the current directory contents into the container
COPY . .

# Make port 5000 available to the world outside this container
EXPOSE 5000

# Set the entry point
ENTRYPOINT ["python3"]

# Run main.py when the container launches
CMD ["python3", "main.py"]
CMD ["main.py"]

0 comments on commit a2a2e4b

Please sign in to comment.