Update Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
CHANGED
@@ -31,3 +31,21 @@ RUN useradd -m -u 1000 user
|
|
31 |
ENV HOME=/home/user \
|
32 |
PATH=/home/user/.local/bin:$PATH \
|
33 |
CUDA_HOME=/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
ENV HOME=/home/user \
|
32 |
PATH=/home/user/.local/bin:$PATH \
|
33 |
CUDA_HOME=/
|
34 |
+
|
35 |
+
# Set the user and working directory
|
36 |
+
USER user
|
37 |
+
WORKDIR $HOME/app
|
38 |
+
|
39 |
+
# Copy the application code
|
40 |
+
COPY --chown=user . $HOME/app
|
41 |
+
|
42 |
+
# Ensure the user has the correct permissions
|
43 |
+
RUN chmod -R 777 $HOME/app
|
44 |
+
|
45 |
+
# Set additional environment variables
|
46 |
+
ENV NUMBA_CACHE_DIR=/tmp/NUMBA_CACHE_DIR/
|
47 |
+
ENV MPLCONFIGDIR=/tmp/MPLCONFIGDIR/
|
48 |
+
ENV PATH="/opt/venv/bin:$PATH"
|
49 |
+
|
50 |
+
# Set the command to run the application
|
51 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|