Team Ai
Apppublic

imran-decoder/pathway

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
Dockerfile28 linesDownload Raw Back to root
1# Use the official Python 3.10 image as the base2FROM python:3.103 4# Set the working directory inside the container5WORKDIR /code6 7# Copy the requirements file to the container8COPY ./requirements.txt /code/requirements.txt9 10# Install the Python dependencies11# --no-cache-dir keeps the image smaller12RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt13 14# Copy the rest of the application code to the container15COPY . /code16 17# Create a non-root user (Required for Hugging Face Spaces security)18RUN useradd -m -u 1000 user19USER user20ENV HOME=/home/user \21    PATH=/home/user/.local/bin:$PATH22 23# Expose port 7860 (The default port for Hugging Face Spaces)24EXPOSE 786025 26# Command to run the application using Uvicorn27# host 0.0.0.0 makes it accessible outside the container28CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]