paddyproject / dockerfile
Danush-R's picture
Create dockerfile
aca3be3 verified
raw
history blame
805 Bytes
# Base image with CUDA and cuDNN
FROM nvidia/cuda:11.2.2-cudnn8-runtime-ubuntu20.04
# Set environment variables for CUDA and cuDNN
ENV CUDA_VERSION 11.2.2
ENV CUDNN_VERSION 8
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
python3-pip \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Install TensorFlow
RUN pip3 install --upgrade pip
RUN pip3 install tensorflow==2.8.0
# Install Streamlit and other Python dependencies
COPY requirements.txt .
RUN pip3 install -r requirements.txt
# Copy the application code
COPY . /app
WORKDIR /app
# Expose the Streamlit port
EXPOSE 8501
# Run the Streamlit application
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]