# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker # you will also find guides on how best to write your Dockerfile # Use an official Python runtime as a parent image FROM python:3.9 # Set the working directory to /code WORKDIR /code # Copy the current directory contents into the container at /code COPY . /code/ # Install any needed packages specified in requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Expose port 8000 for Django development server # EXPOSE 8000 # Collect static files # RUN python manage.py collectstatic --noinput # Run the Django development server CMD ["python", "manage.py", "runserver", "0.0.0.0:7860"] # FROM python:3.9 # WORKDIR /code # COPY ./requirements.txt /code/requirements.txt # RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # COPY . . # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]