Portfolio / Dockerfile
shakauthossain's picture
Update Dockerfile
e5b4a84 verified
raw
history blame contribute delete
513 Bytes
# Dockerfile
FROM python:3.10
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy project files
COPY . .
RUN mkdir -p /app/static/uploads && chmod -R 777 /app/static
# Expose the port Hugging Face Spaces expects
EXPOSE 7860
# Run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]