Chatbot / Dockerfile
BarBar288's picture
Update Dockerfile
723b888 verified
raw
history blame
695 Bytes
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /home/user/app
# Copy the current directory contents into the container at /home/user/app
COPY . /home/user/app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Allocate Resources
RUN docker run -p 7860:7860 --env ACC_TOKEN=your_huggingface_token --cpus=8 --memory=16g your-image-name
# Set the environment variable for Hugging Face access token
ARG ACC_TOKEN
ENV AccToken=${ACC_TOKEN}
# Expose the port the app runs on
EXPOSE 7860
# Define the command to run the application
CMD ["python", "app.py"]