derricka59's picture
Create dockerfile
6c6d5da verified
raw
history blame contribute delete
651 Bytes
# Use an official NVIDIA CUDA runtime as a parent image
FROM nvidia/cuda:11.8.0-base-ubuntu20.04
# Set the working directory to /app
WORKDIR /app
# Install Python and pip
RUN apt-get update && \
apt-get install -y python3-pip
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir transformers torch sentencepiece accelerate huggingface_hub
# Make port 8888 available to the world outside this container
EXPOSE 8888
# Define environment variable
ENV NAME World
# Run app.py when the container launches
CMD ["python3", "app.py"]