automotive-compiler / Dockerfile
avciTheProgrammer's picture
Create Dockerfile
37450f5 verified
FROM python:3.11-slim
# Install GCC, Clang, and Splint (PC-Lint alternative)
RUN apt-get update && apt-get install -y \
gcc \
g++ \
clang \
make \
splint \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Expose port 7860 (Hugging Face Spaces default port)
EXPOSE 7860
# Run the FastAPI application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]