RiskAgent / Dockerfile
jinge13288's picture
Upload 5 files
67285fb verified
raw
history blame contribute delete
541 Bytes
FROM python:3.9-slim
WORKDIR /code
# Install git
RUN apt-get update && apt-get install -y git
# Install PyTorch and other dependencies
COPY requirements.txt /code/
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cu118
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY app.py /code/
# Set environment variables
ENV PYTHONPATH=/code
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
# Expose the port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]