Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
main
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CDIS
Computer Sciences
Courses
CS544
s25
main
Merge requests
!2
Upload New File
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Upload New File
jmin39/main:patch-1
into
p4-dev
Overview
0
Commits
2
Pipelines
0
Changes
2
Closed
JIHONG MIN
requested to merge
jmin39/main:patch-1
into
p4-dev
5 days ago
Overview
0
Commits
2
Pipelines
0
Changes
2
Expand
t1
0
0
Merge request reports
Compare
p4-dev
version 1
29065c0b
5 days ago
p4-dev (base)
and
latest version
latest version
7c8a642f
2 commits,
5 days ago
version 1
29065c0b
1 commit,
5 days ago
2 files
+
82
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
p4/Dockerfile.server
0 → 100644
+
41
−
0
Options
FROM python:3.9
WORKDIR /
# 필요한 패키지 설치
RUN apt-get update && apt-get install -y wget default-jdk iputils-ping
RUN pip install grpcio grpcio-tools protobuf mysql-connector-python pandas pyarrow requests
# Hadoop 다운로드 및 설치
RUN wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.1/hadoop-3.3.1.tar.gz && \
tar -xzf hadoop-3.3.1.tar.gz -C /opt/ && \
rm hadoop-3.3.1.tar.gz
# 환경 변수 설정
ENV JAVA_HOME=/usr/lib/jvm/default-java
ENV HADOOP_HOME=/opt/hadoop-3.3.1
ENV PATH=$PATH:$HADOOP_HOME/bin
# HDFS 설정을 추가하여 명확하게 호스트 지정
RUN mkdir -p /opt/hadoop-3.3.1/etc/hadoop/
RUN echo '<?xml version="1.0" encoding="UTF-8"?>\n\
<configuration>\n\
<property>\n\
<name>fs.defaultFS</name>\n\
<value>hdfs://boss:9000</value>\n\
</property>\n\
</configuration>' > /opt/hadoop-3.3.1/etc/hadoop/core-site.xml
# 서버 코드 복사
COPY server.py /
COPY lender.proto /
COPY client.py /
# gRPC 생성
RUN python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. lender.proto
# 파티션 디렉토리 생성
RUN mkdir -p /partitions
# 서버 실행 (CLASSPATH를 설정한 후 실행)
CMD ["/bin/bash", "-c", "export CLASSPATH=$(hadoop classpath --glob) && python server.py"]
\ No newline at end of file
Loading