xca / Dockerfile
asv7j's picture
Update Dockerfile
95e2b53 verified
raw
history blame contribute delete
557 Bytes
# Use the official Python image from the Docker Hub
FROM python:3.9
run cat /proc/meminfo
# Create a new user and set permissions
RUN useradd -m -u 1000 user
USER user
# Set environment variables
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /code
run cat /proc/cpuinfo
RUN pip install libretranslate waitress psutil
# Copy the application code
COPY --chown=user . .
# Expose the port the app runs on
EXPOSE 7860
# Run the application using waitress (recommended for production)
CMD ["waitress-serve", "--host", "0.0.0.0", "--port", "7860", "app:main"]