clean nvidia

pull/12/head
Kye 2 years ago
parent 9c9165aed6
commit d9711e2a6a

@ -1,7 +1,27 @@
# Use an official Python runtime as a parent image
FROM nvidia/cuda:11.7.0-runtime-ubuntu20.04 FROM nvidia/cuda:11.7.0-runtime-ubuntu20.04
# Set working directory # Set environment variables
WORKDIR /app/ ENV EVAL_PORT=8000 \
MODEL_NAME=gpt-4 \
CELERY_BROKER_URL=redis://localhost:6379 \
SERVER=http://localhost:${EVAL_PORT} \
USE_GPU=True \
PLAYGROUND_DIR=playground \
LOG_LEVEL=INFO \
BOT_NAME=Orca \
# You will need to set these environment variables to your actual keys in production
OPENAI_API_KEY=your_openai_api_key \
WINEDB_HOST=your_winedb_host \
WINEDB_PASSWORD=your_winedb_password \
BING_SEARCH_URL=your_bing_search_url \
BING_SUBSCRIPTION_KEY=your_bing_subscription_key \
SERPAPI_API_KEY=your_serpapi_api_key \
REDIS_HOST=your_redis_host \
REDIS_PORT=your_redis_port
# Set work directory
WORKDIR /usr/src/app
# Install system dependencies # Install system dependencies
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
@ -11,23 +31,18 @@ RUN apt-get update && \
apt-get install -y python3.10 python3-pip curl && \ apt-get install -y python3.10 python3-pip curl && \
apt-get install -y nodejs npm apt-get install -y nodejs npm
# Set environment variables # Add requirements file
ENV PATH "/root/.local/bin:$PATH" COPY requirements.txt ./
ENV PORT 8001
# Copy project files
COPY requirements.txt .
# Install project dependencies # Install any needed packages specified in requirements.txt
RUN python3.10 -m pip install --upgrade pip && \ RUN python3.10 -m pip install --upgrade pip && \
python3.10 -m pip install --no-cache-dir -r requirements.txt python3.10 -m pip install --no-cache-dir -r requirements.txt
# Copy application files # Bundle app source
COPY . . COPY . .
# Expose port # Expose port
# EXPOSE ${EVAL_PORT} EXPOSE ${EVAL_PORT}
# Run the application # Run the application
CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "8000"] CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "8000"]
Loading…
Cancel
Save