llm-beta / Dockerfile
datavorous's picture
Update Dockerfile
a824f6d verified
raw
history blame contribute delete
803 Bytes
# Use the base image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy requirements file to install dependencies
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Create a writable cache directory
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Make the /app directory writable
RUN chmod -R 777 /app
# Set the TRANSFORMERS_CACHE environment variable to point to the writable cache directory
ENV TRANSFORMERS_CACHE=/app/cache
# Copy the application code to the container
COPY . .
# Expose the application port (if applicable)
EXPOSE 8000
# Add these lines before CMD
RUN ls -la /app
RUN ls -la /app/data
# Command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]